V
vl
Hi All,
I've been searching the groups for help on my outer join syntax. So
far, I get the hints that I should be using parenthesis. It helped
for 3 tables. But what if I want to join more - say 4 to 8? tables?
Here's my SQL:
SELECT
findings.finding_id,
findings.finding_date,
findings.discussion,
vet.last_name,
clinic.clinic_name,
patient.patient_name
FROM
( findings LEFT JOIN vet ON (findings.vet_id = vet.vet_id) )
LEFT JOIN clinic ON (findings.clinic_id = clinic.clinic_id)
LEFT JOIN patient ON (findings.patient_id = patient.patient_id)
Error message:
Syntax error (missing operator) in query expression
'(findings.clinic_id = clinic.clinic_id)
LEFT JOIN patient ON (findings.patient_id = patient.patient_id'.
If I take out the last LEFT JOIN clause (patient table), and remove
the patient_name column, the query runs fine.
I also played with the placement of the parenthesis... to no avail.
What am I doing wrong?
TIA,
-vl
I've been searching the groups for help on my outer join syntax. So
far, I get the hints that I should be using parenthesis. It helped
for 3 tables. But what if I want to join more - say 4 to 8? tables?
Here's my SQL:
SELECT
findings.finding_id,
findings.finding_date,
findings.discussion,
vet.last_name,
clinic.clinic_name,
patient.patient_name
FROM
( findings LEFT JOIN vet ON (findings.vet_id = vet.vet_id) )
LEFT JOIN clinic ON (findings.clinic_id = clinic.clinic_id)
LEFT JOIN patient ON (findings.patient_id = patient.patient_id)
Error message:
Syntax error (missing operator) in query expression
'(findings.clinic_id = clinic.clinic_id)
LEFT JOIN patient ON (findings.patient_id = patient.patient_id'.
If I take out the last LEFT JOIN clause (patient table), and remove
the patient_name column, the query runs fine.
I also played with the placement of the parenthesis... to no avail.
What am I doing wrong?
TIA,
-vl