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

Which records does access keep when import results in key violations?

Status
Not open for further replies.

DSburgh

MIS
May 19, 2005
26
0
0
US
I am trying to import data to an existing table with a primary key of Machine_ID. The data file I am importing has a few repeat instances of Machine_ID so about one fifth of the records fail due to key violations. I want to record the most recent record (where Start_week is at it’s max). If I sort the data file by Start_Week from highest to lowest, will this work the way I want it to or am I going to have to import it to a temporary table then run some queries to get the data I want?
 
I'd try the sorted file way first.

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