O
Opal
I am trying to create a subquery to delete unmatched records between
two
tables in Access 2003. I patterned by subquery from Allen Browne's
website as follows:
DELETE FROM EmpInfo
WHERE NOT EXISTS
(SELECT EmpNumber
FROM EmpInfoTemp
WHERE EmpInfoTemp.EmpNumber = EmpInfo.EmpNumber);
But am getting the following message:
"Query must have at least one destination field"
I am using a subquery because when I tried to create the query using
the
unmatched query wizard I get an error:
"Could not delete from specified tables"
Also, I want to add two additonal criteria to the query, i.e.:
WHERE ((EmpInfo.SupLink)<>"QRA0" And (EmpInfo.SupLink)<>"QRB0")
Can someone please point me in the right direction to get this to
work?
Thank you!
two
tables in Access 2003. I patterned by subquery from Allen Browne's
website as follows:
DELETE FROM EmpInfo
WHERE NOT EXISTS
(SELECT EmpNumber
FROM EmpInfoTemp
WHERE EmpInfoTemp.EmpNumber = EmpInfo.EmpNumber);
But am getting the following message:
"Query must have at least one destination field"
I am using a subquery because when I tried to create the query using
the
unmatched query wizard I get an error:
"Could not delete from specified tables"
Also, I want to add two additonal criteria to the query, i.e.:
WHERE ((EmpInfo.SupLink)<>"QRA0" And (EmpInfo.SupLink)<>"QRB0")
Can someone please point me in the right direction to get this to
work?
Thank you!