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

Appending into new table appends 0 records 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I am working in access 2003. I am trying to append records that are not duplicates from one table into another. So in the destination table I set the first field called cptcode to primary indexed yes no duplicates. I set up my append query to take records from the first table and append them to the next table. Only nothing happens I get a message after the query is run that I have appended 0 records. The table name that the records reside in is called WMG_CS_Data_012013_012013. The destination table is called tblTranscodes_1. Any help is appreciated.

Tom

Code:
INSERT INTO tblTranscodes_1 ( cptCode, cptComp, cptDesc, TransType, ProcID, ProcType )
SELECT WMG_CS_Data_012013_012013.[CPT Code], WMG_CS_Data_012013_012013.[CPT Component], WMG_CS_Data_012013_012013.[CPT Name], WMG_CS_Data_012013_012013.[Trans Type], WMG_CS_Data_012013_012013.[Revenue Center*], WMG_CS_Data_012013_012013.[Revenue Center Name]
FROM WMG_CS_Data_012013_012013, tblTranscodes_1;
 
Your FROM clause should have a single table:
INSERT INTO tblTranscodes_1 ( cptCode, cptComp, cptDesc, TransType, ProcID, ProcType )
SELECT [CPT Code], [CPT Component], [CPT Name], [Trans Type], [Revenue Center*], [Revenue Center Name]
FROM WMG_CS_Data_012013_012013;

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top