uploading problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

uploading problem

Hello everyone,
I have created several DTS packages that transfer data from one database to another, i am using an ASP form to run these packages from the browser. These packages are run by the user once every 15 days and data is transfered from the source database to the destination database, if the user executes this package more than once, data that was already entered into the database in the first run is entered again creating a whole bunch of duplicate records, how do i eliminate this duplication and let the user know that the package has already been executed.
thank you in advance

Load data in auxiliary table, then use execute dts task to insert … select where not exists(…) or its left join equivalent (faster).
Hi, i created an auxillary table and am loading data into it, after that how do i insert into the tables that i want to, should i select the execute sql task or the transform data task and where do i put in select where not exists statement? regards

execute sql task, something like:
insert into targetTable(…)
select …
from sourceTable s
where not exists(select *
from targetTable t
where t.pk = s.pk)

thank you mmarovic i really appreciate your help, i will try your code and see how things work out. regards
Posted – 02/24/2005 : 10:56:56
——————————————————————————– hi mogaligundla, i know this will make me sound like a total jerk! but i am DESPERATE!!!
it would be gr8 and mighty kind of you if you could give me the code for transfering the data from a source database to a destination database.
please! thanx in advance <<<<DTA>>>>