Daniel,
Try this:
SELECT
a.passport_listing_id
,a.passport_registration_id
,a.email_sent_attendance
,a.s_uid
,a.student_id
,a.people_id
,coalesce(b.fname, c.fname) fname
,coalesce(b.lname, c.lname) lname
,coalesce(b.email, c.email) email
,passport_attendance_id
FROM passport_registration a
Left outer join students b
On a.student_id = b.student_id
Left outer join people c
On a.people_id = c.id
Left outer join passport_attendance d
On a.passport_listing_id = d.passport_listing_id
and (a.student_id = d.student_id
or a.people_id = d.people_id)
WHERE a.passport_listing_id = 321
It adds some more criteria for the passport_attendance.
-----Original Message-----
From: daniel kessler [mailto:[email protected]]
Sent: Wednesday, October 28, 2009 10:19 AM
To: cf-talk
Subject: Re: SQL Join help needed
And here's the page with the data:
http://sph.umd.edu/test/passport_stats.cfm?passport_listing_id=321
I seem to be having trouble posting today, so sorry if this shows up a
bunch of times.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327797
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4