Left Outer Join Drama - SQL command not properly ended
968664Oct 16 2012 — edited Oct 16 2012What I am trying to do is get my report to list every room in the table even if there is nothing scheduled in the room for the selected date. It was suggested that I add a command to the report to force the left outer join but I keep running into errors. This is how I have it worded:
SELECT
"ROOM"."ROOM_ID",
"PATIENT_CARE_EVENT"."OR_NUM"
FROM
"ROOM"."ROOM" LEFT OUTER JOIN "PATIENT_CARE_EVENT"."PATIENT_CARE_EVENT"
ON "PATIENT_CARE_EVENT"."OR_NUM"="ROOM"."ROOM_ID" AND "PATIENT_CARE_EVENT"."PROCEDURE_DATE_DT" IN {?Start Date} TO {?End Date}
Someone else suggested that I change the IN/TO wording in the last line to BETWEEN/AND. When I do that it gives me an error stating that the table or view does not exist. Can someone please help me figure this out... any suggestions would be greatly appreciated.
I am working with Crystal Reports 10 & Oracle 9i
Thanks