When I execute the following request, I get an error
"Syntax error (missing statement) in the query expression 'diagn.Patient_No =' Patient_NO INNER JOIN Illness ON Illness.Illness_Code = Diagnosis.Illness_Code '
SELECT Patient.Last_Name AS LastName, Patient.First_Name AS FirstName, Patient.Gender AS Gender, Patient.Age AS Age, Illness.Illness_Desc AS illness, Medication.Medication_Desc AS Medication, Prescription.Dosage AS Dosage FROM Patient INNER JOIN Diagnosis ON Patient.Patient_No = Diagnosis.Patient_No INNER JOIN Illness ON Diagnosis.Illness_Code = Illness.Illness_Code INNER JOIN Prescription ON Patient.Patient_No = Prescription.Patient_No INNER JOIN Medication ON Prescription.Medication_code = Medication.Medication_code
I confirmed that the disease code is both in the Diseases and Diagnosis tables, and should everything work? Not sure if during this connection I need to add these disease codes to the select statement? I tried adding them to my Select, and it didn't seem to work for me either.
sql
Zi0n1
source share