Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> left outer join
i want to write a query in oracle that returns a list of all events and a field flagged if a specific attendee attended those events:
example result set:
EventName Attended
My Event1 Y
My Event2 N
My Event3 Y
My Event4 Y
SELECT events.name, ISNULL(attendance.attended)
FROM events, attendance
WHERE events.eventid = attendance.eventid(+) AND attendance.UID='SOMEID'
In this statement the ISNULL syntax does not work. ALso, if run without, it will only return records where there is a corresponding record in attendance with UID='SOMEID'. It's not a complete left outer join with that second filter in the where clause.
Sent via Deja.com
http://www.deja.com/
Received on Thu Feb 08 2001 - 16:10:49 CST