Yeah, that's how I would do it, but that doesn't work if the server / DBs aren't known. First I have to remove any records that don't belong in the destination table, then copy the new records into the destination table, and then update the changed records in the destination table.
So, for example,
DELETE * FROM Remote.RemoteDB.dbo.tblWha
How do I provide values for Remote/RemoteDB and Main/MainDB at runtime?
Dex*
Main Topics
Browse All Topics





by: wytcomPosted on 2004-03-09 at 12:10:09ID: 10554047
You could use a Execute SQL Task object in your DTS package to clear the destination table and copy the data from the source table. You would still have to explicitly reference the database names though. To treat the source/destination as dynamic, you could put that information in the database somewhere. Then write the SQL in the Execute SQL Task object to get these locations and then do the clear and copy.
Right click on your Execute SQL Task object in your DTS designer, then select properties. That takes you to the editor for adding your SQL code.