Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Using Primary Keys to filter out duplicate records when importing with DTS

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-17 : 08:18:09
Jim writes "I am importing a text file into a SQL Server 2000 table via DTS. I know that I will be importing duplicate records, but I would like DTS to just drop the duplicates and continue importing the rest of the text file. As DTS is set up now, as soon as a PK violation is detected, it stops the load process. How can I get DTS to load only the unique records?

Thanks,
Jim"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-17 : 12:43:59
You should import the data into a staging table. Then run T-SQL to transfer the non-duplicate data into your primary table.

Tara
Go to Top of Page
   

- Advertisement -