December 8, 2005 at 11:39 pm
hi,
i am trying to create a dts that uses ddq to upload an excel file into an sql table. i want the ddq to do an update if the source data is existing in the destination table. i want to do an insert if its not existing.
i created a lookup that queries the table with code equal to the source data that i am trying to upload but i keep getting an error.
can anyone post a sample activex script (that works) that handles an update/insert task please. would really appreciate it. getting a bit tired browsing the net =(
regards.
ann
December 9, 2005 at 4:14 am
Hi Ann, I would do this slightly differently.
Create a new SQL Server table - 'import', or whatever - and import all of your Excel data into that.
Then have your DTS package execute a stored procedure that performs INSERTs/UPDATEs from the import table to your main table. You could build in error reporting here too (trapping dodgy data).
Final stage of your DTS package is to do something with the import table - DELETE/TRUNCATE/set 'imported' flag to 'Y' etc. Then you're ready for the next import.
Regards.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
December 9, 2005 at 11:39 pm
hi phil,
why did i didnt think of that. that's a good idea. i'll create one that uses that logic. i
although, 'm still interested to hear some idea on how to implement the lookups/ddq/insert/update logic in dts.
ann
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply