Al
At 04:57 PM 3/12/2004, you wrote:
>Is this in the ballpark:
>
>SELECT c.name, MIN(dateupdated) as oldest_trial
>FROM contacts c, trials t, contactdetails cd
>WHERE c.contactID = cd.contactID
>AND t.trialID = cd.trialID
>GROUP BY c.name
>
>Just a whack at it. :-)
>
>Greg
>
>-----Original Message-----
>From: Al Musella, DPM [mailto:[EMAIL PROTECTED]
>Sent: Friday, March 12, 2004 3:09 PM
>To: CF-Talk
>Subject: Need sql help
>
>My brain is fried... this should be easy:
>3 tables:
>
>Contacts: name and contactID (one entry for each doctor)
>Trials: Has List of clinical trials. TrialID, DateUpdated (each trial
>can
>have multiple doctors, each doctor can have multiple trials)
>ContactDetails: ContactID, Trial ID (for many to many relation, doctors
>
>can have none, one or many entries)
>
>I want to list the names of each doctor (even if they have no trials),
>and
>the date of the single OLDEST trial (dateupdated).
>
>Can anyone help? thanks!
>I am using sql 7.0
>Al
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

