Addition to a Query!

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

This is what the Query code is and this is what I would like to added to
it......Thanks Bob
SELECT tblHorseInfo.HorseID, funGetHorse(0,tblHorseInfo.HorseID,false) AS
Name, [StableReturnDate]
FROM tblHorseInfo
WHERE Status LIKE 'Active*'
ORDER BY funGetHorse(0,tblHorseInfo.HorseID,true),
funGetHorse(0,tblHorseInfo.HorseID,false);
**And if the Horse is in TblInvoice_ItMdl dont show his name***

Thanks in advance.........Bob Vance
 
SELECT tblHorseInfo.HorseID,
funGetHorse(0, tblHorseInfo.HorseID, false) ASName,
[StableReturnDate]
FROM tblHorseInfo
WHERE Status LIKE 'Active*'
AND tblHorseInfo.HorseID NOT IN
(SELECT HorseID fromTblInvoice_ItMdl)
ORDER BY funGetHorse(0, tblHorseInfo.HorseID, true),
funGetHorse(0, tblHorseInfo.HorseID, false);

I'm guessing about the names in (SELECT HorseID fromTblInvoice_ItMdl) . You
need to put in the proper fields that link the two tables.
 
Back
Top