November 7, 2005 at 8:08 am
Hi,
If I have two tables, ordhed and qcordhed. Both tables have the field ordhedid. I want to find records in ordhed that do not have an ordhedid in qcordhed. What do I need to do to ahcieve this?
Many Thanks
November 7, 2005 at 8:19 am
SELECT *
FROM ordhed
WHERE NOT EXISTS (SELECT * FROM qcordhed WHERE ordhedid = ordhed.ordhedid)
November 7, 2005 at 9:45 am
SELECT *
FROM Ordhed O1
LEFT JOIN QCordhed QC ON O1.OrdhedID = QC.OrdhedID
WHERE QC.OrdhedID IS NULL
as an alternative
Good Hunting!
AJ Ahrens
webmaster@kritter.net
November 8, 2005 at 5:00 am
works a treat, thanks for the help!!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply