DTS using LastModified date

  • I have a DTS where I want the source table to read

    SELECT *

    FROM TableName

    WHERE Transaction_Date >= LastModifiedDate

    LastModifiedDate I am storing in a statistics table and updating through an earlier script. It is basically the MAX( Transaction_Date ) of the table I'm working with. Can you offer any suggestions on how I can only copy over those records that need updating? I appreciate any advice.

    If its the best way to go, how do I take the results of an SQL query and put it in a global variable?  All tables I'm dealing with are located in the LastModified table, with column names TableName and LastModified (among others)

     

  • select * from tablename where transaction_date >= ( select MAX(modified_date) from whatevertablename)

     

  • The only catch on that is that WhateverTableName is on a different connection.  TableName is in Oracle and WhateverTableName is in SQL Server.

     

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

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