To import just new rows, you can use not exists to select
only the new rows...something like:
select *
from YourSourceTable
where not exists
(select *
from YourDestinationTable
where YourDestinationTable.YourPK = YourSourceTable.YourPK)
-Sue
On Thu, 26 Jan 2006 07:31:04 -0800, "Linz"
<Linz (AT) discussions (DOT) microsoft.com> wrote:
Quote:
I'm trying to implement an archive operation using DTS. In this case, data
from certain tables I need to overwrite in the destination DB, so I'm using
Copy SQL Server Object task, its fine. But for certain tables, I need to
append the new rows. Here I'm using datapump task. In this scenario, when
executing the task, there may be some existing rows in the destination DB, so
I'm getting PK already existing errors. How can I copy only the non-existing
rows to the destination DB ?
Please help me in doing this using datapump task ..
TIA,
Jack |