Copying from one table to another where values dont match.

PuddinPie

Registered User.
Local time
Yesterday, 21:58
Joined
Sep 15, 2010
Messages
149
Ok. This is going to be a stupid question but its really earking me that I can't figure it out right now. :banghead:

I have two tables. TableA and TableB They both have the same columns.
I need a query that will look at the diferences between TableA.Column1 and TableB.Column1 and copy whatever TableB.Column1 is missing from TableA.Column1

So I want it to copy over the entire record based on what TableA.Column1 has the TableB.Column1 does not have.

I've done this before and in VBA for some reason I'm having a brain fart.

Thank you
 
Ok. This is going to be a stupid question but its really earking me that I can't figure it out right now. :banghead:

I have two tables. TableA and TableB They both have the same columns.
I need a query that will look at the diferences between TableA.Column1 and TableB.Column1 and copy whatever TableB.Column1 is missing from TableA.Column1

So I want it to copy over the entire record based on what TableA.Column1 has the TableB.Column1 does not have.

I've done this before and in VBA for some reason I'm having a brain fart.

Thank you

Code:
SELECT Table1.Col1 
FROM Table1 
WHERE Table1.Col1 NOT IN (SELECT Table2.Col1 FROM Table2)
 
Thank you.

That worked perfectly. As soon as I saw it was said to myself "Self ... Your stupid."
:)
 

Users who are viewing this thread

Back
Top Bottom