Just add it after the FROM clause. Also keep in mind that if you use
all * in the SELECT clause, you won't be able to access all names in CF.
You have to use aliasses for the names

SELECT stuff.*,
    person1.first_name AS first_name1, person1.last_name AS last_name1,
    person2.first_name AS first_name2, person2.last_name AS last_name2,
    person2.first_name AS first_name2, person1.last_name AS last_name2
FROM  stuff
LEFT JOIN persons AS person1 ON stuff.first_person_id =
persons.person_id
LEFT JOIN persons AS person2 ON stuff.second_person_id =
persons.person_id
LEFT JOIN persons AS person3 ON stuff.third_person_id =
persons.person_id
WHERE ... (your where clause here)

> -----Original Message-----
> From: brobborb [mailto:[EMAIL PROTECTED]
> Sent: donderdag 20 mei 2004 9:07
> To: CF-Talk
> Subject: Re: SQL HELP!
>
> What if I wanted to add a WHERE clause?
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to