Thanks for the suggestion, Scott. I must admit, I hadn't thought about
putting the date restriction into a join clause. Another trick to add
to my arsenal. :)

Cheers,

Seona.

2008/8/25 Scott Thornton <[EMAIL PROTECTED]>:
>
> Hi Seona,
>
> I like to use a LEFT OUTER JOIN for a query like this. It would look 
> something like
>
>       SELECT  u.emailaddress, u.firstname, u.surname, u.rec_id,
> bde.bde_entrydate
>       FROM    users u
>                       INNER JOIN body_diaries bd
> ON u.rec_id = bd.bdi_usr_id
>                      left outer join JOIN body_diary_entries bde
> ON bd.bdi_id = bde.bdi_id
> where
> bde.bdi_id is null
>
> which should return users that have body_diaries, but NO body_diary_entries. 
> you can add in the left outer join clause the date parameter for that day. eg
>
>                      left outer join JOIN body_diary_entries bde
> ON bd.bdi_id = bde.bdi_id and
> entry_date > #CreateODBCDate(     todays_date     )#

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to