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)
 Overwrite data by Import/Export?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-27 : 11:43:02
esd writes "I always need to copy data between 2 tables. However, the Import/Export does not allow me to export those record who already existed in the destination because of the primary key restriction I setted on the table. So I want to ask does there have any methods in SQL2000 that I can still copy those old and new record to the destination? (I don't want to delete the record on the destintation before the Import/Export, but just want to append the new record from the source)

Many thanks!"

dataphile
Yak Posting Veteran

71 Posts

Posted - 2002-06-03 : 08:45:18
1. You can create the primary key constraint without enforcing it on new data.

2. If you are going to violate the primary key constraint remove the constraint altogether. Why did you create it in the first place. It will only confuse you in future if you've got a constraint that isn't what it says it is.

3. Create an auto increment field and use that as the primary key.

Go to Top of Page
   

- Advertisement -