How to update table Incrementally using DTS

  • Hi all,

    I need to update my SQL Server 2000 tables with rows from an Oracle table. Using a DTS package, how can I get only rows from the Oracle table that have a date value greater than the maximum date from the SQL Server table?

    Thanks

    Henok


    Henok

  • If you leave out the DTS part its easier to think about - you just need to a join between the two tables. For doing things like this you might consider making a working table on one server or the other that just has the primary key and update date. Joins across linked servers don't always do well! If you make the working table up front, you can move it to the other server, then index and join locally.

    Andy

  • Thanks for your reply sir,

    I have a problem though. I am not allowed to tamper with the Oracle database. Here's what I did: using DTS I created an Execute SQL task that queries the SQL Server table for the maximum activity date and puts it in a global variable. Then I use that value in the global variable in a Transform Data task to query the Oracle table by writing a script that says:

    select * from Oracle_table where activity_date > ?

    ? refers to the global variable

    This works when the Transform data task is used to transfer data b/n two SQL Server databases

    Henok


    Henok

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply