SQL Server Performance Forum – Threads Archive
DTS syncronizing 2 databasesOk here it is, my first question on this forum.
I’ve got a DTS package, in this package I need to delete rows in table X in database dbX only if those rows (the pk) exist in table X in database dbY. Is there a simple way to do this?
The solution I’ve come up with sofar is, to create a temp table in dbX, populate that temp table with the id’s (pk) of table X in dbY and subsequently use a ExecuteSQL to delete the rows in dbX using the temp table against table X. Subsequently I drop the temp table. It works but I can’t say that it seems a very elegant solution. I rather do an ExecutSQL deleting rows form table X in dbX, based on table X in dbY directly. But I don’t know how. Anyhelp appreciated. Cheaars Joer
Hi I forgot to say that the two databases reside on different computers.
There is a thing called lookup