You need to use an outter join.  Syntax: TableAField =* TableBField.  Depending on which side the table that may or may not have data is depends on which side of the = the * goes on.
  ----- Original Message -----
  From: Al Musella, DPM
  To: CF-Talk
  Sent: Friday, March 12, 2004 3:08 PM
  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]

Reply via email to