>I'm trying to figure out the SQL Syntax to find orphan records in a detail table, that have no counterpart in a parent table. This is something like SELECT all records in TABLE A which don't have a matching record (on a key field) in TABLE B. I can do this with brute force in good 'ol dbase code, but can't SQL do this?
>
>Thanks.
>
>--- L
Heres a try:
SELECT * ;
FROM tblMaster;
WHERE tblMASTER.keyfield NOT IN (SELECT keyfield FROM tblDetail)
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.