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

Import Error table 1

Status
Not open for further replies.

looperboy

Technical User
Dec 12, 2003
37
DE
When importing to an existing table from a text file, as expected, i receive a pop-up box telling me that some records have been lost whenever I have duplicates. However, no Import Error table seems to be created. I have read there should be one, but I can't find it.

Can anyone help?
 
Hi Looper,

I do not think you get an error table when trying to import data that would create a index violation. All you get is a dialogue box explaining the situation.

To get a table with the excluded records:

1) Make a copy of the table (structure only)
2) Open the table in design mode and remove the index that was preventing all records from being imported
3) Now import the data into the new table.
4) Create an unmatched query between the tables and see the records that were excluded.
5) Make the unmatched query into a "make-table" query to store only the excluded records.

If this sounds like what you need and you do not know how to do part of it just let me know where you need help.

BOL.

al

If information is the currency of democracy then, secrecy allows one to print counterfeit money.
 
that sounds great, thanks. Is there an easy way to make an unmatched query in the Query Design view, or will I need to use some SQL?
 
As a general solution always first import your data into a table. Access will create one automatically as you are aware. Then do an append query from the imported table to the target table. Then do a simple left join query from the imported table to the target with something like WHERE TARGET.FIELD7 IS NULL. This will contain only the records that were rejected.

 
Hi Looper,

If you choose "Insert" then "Query" from the menu you will get the query wizards (if loaded). Just choose "find unmatched" and Access will walk you through the whole thing and you can inspect the query produced.

al


_____________________________________
If information is the currency of democracy then, secrecy allows one to print counterfeit money.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top