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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Query! 3

Status
Not open for further replies.

abbottboi

IS-IT--Management
Nov 14, 2005
94
CA
Hi,

I want to append 1500 records to an existing table i have. So one table to another. The problem i'm having is that when i make the append query run it duplicates my records 576 times making me have far more duplicates than even one should ever want.

I do look at datasheet view and it too has the dublicates for no reason :(

Does anyone know why it creates duplicates? any quick fixes?

thanks
 
Could you post the SQL of the append query?

Let them hate - so long as they fear... Lucius Accius
 
Code:
INSERT INTO Prospects ( old_ID, donor_type, prefix, first_name, last_name, re_address1, re_address2, re_city, re_prov_state, re_nation, re_postal_zip, bu_company )
SELECT Sheet1.old_ID, Sheet1.donor_type, Sheet1.prefix, Sheet1.first_name, Sheet1.last_name, Sheet1.re_address1, Sheet1.re_address2, Sheet1.re_city, Sheet1.re_prov_state, Sheet1.re_nation, Sheet1.re_postal_zip, Sheet1.bu_company
FROM Prospects, Sheet1;
Thanks!
 
Your select will produce

(# of Records in Prospects) * (# of Records in Sheet1}

records because it is a Cross-Join.

Perhaps you want an inner join where the rows are matched on common fields in the two tables.
 
Replace this:
FROM Prospects, Sheet1
with this:
FROM Sheet1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top