![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I currently have a DTS package that imports records from a text file into a table. However, occasionally the text file has duplicate records in it. When this occurs, the DTS package will fail and due to primary key constraints on the table. To solve the problem, I need to go into the text file and remove the offending records. My question is, can a DTS package be set up to ignore duplicate records, or must this step be performed at the table level? Right now, the steps involved in getting the records to the live table are as follows: 1) Download text file from an FTP site 2) Import the records via a DTS package to a temporary table (while observing the primary key constraints). 3) Move the records from the temp table to a live table only when the record is not duplicated in the live table 4) Delete all records out of the temp table I was thinking about removing the primary key constraints from the temporary table, but I'm wondering if I would get an "ambiguous record" error when I selected these records from the table and tried to insert them into the live table. Does anyone have any ideas? Thanks! Brian. |
#3
| |||
| |||
|
|
Hi All, I currently have a DTS package that imports records from a text file into a table. However, occasionally the text file has duplicate records in it. When this occurs, the DTS package will fail and due to primary key constraints on the table. To solve the problem, I need to go into the text file and remove the offending records. My question is, can a DTS package be set up to ignore duplicate records, or must this step be performed at the table level? Right now, the steps involved in getting the records to the live table are as follows: 1) Download text file from an FTP site 2) Import the records via a DTS package to a temporary table (while observing the primary key constraints). 3) Move the records from the temp table to a live table only when the record is not duplicated in the live table 4) Delete all records out of the temp table I was thinking about removing the primary key constraints from the temporary table, but I'm wondering if I would get an "ambiguous record" error when I selected these records from the table and tried to insert them into the live table. Does anyone have any ideas? Thanks! Brian. |
![]() |
| Thread Tools | |
| Display Modes | |
| |