Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question 1

Status
Not open for further replies.

owens2024

Technical User
Apr 6, 2004
9
US
Okay so I'm new to this Access stuff... so go easy on me!

I have two tables of Customer Data in the same database, one from December one from April. The April table includes all the records from the December table and additional new records. The field names in both tables are identical and there is a ShipToID that is unique to each record in both tables.

What I'd like to do is make a new table with only the records that are in the April table that are not in the December table. Sort of April - December.

Any help is greatly appreciated!

- Lee
 
create your new table then run this query

INSERT INTO NEWTABLE (SELECT * FROM TblAPRIL where ShipToID not in (select SHipToID FROM tblDecember))
 
Thanks for your help but when I try to run this query I get an error message "Syntax error in INSERT INTO statement"

This is my query (using the one you gave me)
INSERT INTO [New Customers] (SELECT * FROM [4-24 customer list] where ShipToID not in (select ShipToID FROM [12-9 customer list]));

I am using Access 97.

 
Are they IDENTICAL tables? Exact same NUMBER of fields?

leslie
 
Yes they are identical, same number of fields, same field names, same field properties...

- Lee
 
If you just run this sub-query, do you get the records you would expect to see?

SELECT * FROM [4-24 customer list] where ShipToID not in (select ShipToID FROM [12-9 customer list])

Leslie

 
I did so and got the records I needed... So I just changed it to a maketable query... and now I have what I wanted!

Thanks for your help!

- Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top