par428 said:
I have a master list of surgical procedures and comparing it to the past 2
years of procedures from that list. I want Access to tell me which procedures
from the master list were NOT done in that 2 year span.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It helps if we know the structure of your table(s). So this is a guess.
One, probably faster, way:
SELECT P.procedure_id
FROM Procedures AS P LEFT JOIN ProceduresPerformed AS PP
ON P.procedure_id = PP.procedure_id
WHERE PP.procedure_id IS NULL
Another way:
SELECT procedure_id
FROM Procedures
WHERE procedure_id NOT IN (SELECT procedure_id
FROM ProceduresPerformed)
Make sure procedure_id is indexed in both tables.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBSeTho4echKqOuFEgEQIdMgCgnIJcHHQCKt69b4AwXdzeVITEsyQAn0fj
liyJPLoPOqUMAN7Ujhhxil9c
=JvlI
-----END PGP SIGNATURE-----