Help with this query.. How to..

Results 1 to 2 of 2

Thread: Help with this query.. How to..

  1. #1
    Join Date
    Dec 1969

    Default Help with this query.. How to..

    Hi there.. i need to know if its possible to do this.. <BR><BR>i have three table<BR><BR>TRAINEES --&#062; TraineeID, firstname, lastname<BR>TITLES --&#062; TitleID, Name, fee<BR>Training --&#062; TrainingID, TraineedID, titleID, Notes, Date<BR><BR>I have some data in the tables. I am trying to write a query that will tell me whether someone has done a specific training or not. I need to be able tell what courses anyone hasnt done..<BR><BR>I tried this but i dont think its right..<BR><BR>select trainees.firstname from trainess, titles, training<BR>where ((trainees.firstname=[Enter name]) and (trainee.traineeid not in(select traineeid from training)) and (titles.titleID not in (select titleid from training))<BR><BR>Any help will be greatly appreciated..<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Help with this query.. How to..

    The following SQL statement will list, given a person&#039;s TraineeID, the courses they haven&#039;t attended:<BR><BR>select Name from Title where &#060;Enter-TraineeID&#062; not in (select TraineeID from Training where Training.TitleID = Title.TitleID)<BR><BR>Hope that&#039;s the sort of thing you were after.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts