Help with a SQL Statement

G

Greg

I need to create a SQL statement that will return rows
from one table that were supposed to be appended to
another. In other words:

Show me all rows in table A where the (ID, Code and Date)
combination aren't in table B.

It sounds simple, but my old brain doesn't work like it
used to...

Thanks.
 
G

Greg

Access figured it out for me.....

SELECT A.Num, A.LeaveCode, A.AccruedHours, A.EffDate
FROM A LEFT JOIN B ON (A.Num = B.sEmployeeIDf) AND
(A.LeaveCode = B.sLeaveCodeIDf) AND (A.EffDate =
B.dtmPayDate)
WHERE (((B.sEmployeeIDf) Is Null) AND ((B.dtmPayDate) Is
Null) AND ((B.sLeaveCodeIDf) Is Null));

....just in case anyone was interested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top