![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||||||
| |||||||
|
|
Disclaimer - I'm a relative DTS newbie, so be gentle Scenario - I am sourcing data from a SQL DB on one server into a staging database in SQL Server on another physical server. For my incremental |
|
I am trying to use the following simple script to select the new and updated records. This code is in the Transform Data task in the SQL Query |
|
-------------------------------------- DECLARE @UpdateDate DATETIME EXECUTE @UpdateDate = update_lookup 'TableName', 'DBName' SELECT dbo.SourceTable.* FROM dbo.SourceTable WHERE (Date_Added > @UpdateDate) OR (Date_Modified > @UpdateDate) -------------------------------------- Problems/Questions: 1. The stored proc is not recognized because it is on the target server and this code is relative to the source server. Is there a way to specify |
|
2. I tried defining a source connection using the linked server that I have defined on the target database. However, the connection settings only |
|
3. I tried using the Lookup tab in the transform data task to read the UpdateDate into a global var, and then reference that global var in the sql |
|
I suspect that what I am trying to do is pretty standard stuff. What is the best way to implement this using DTS since there are 3 tables involved |
|
Thanks for any tips or ideas. |
![]() |
| Thread Tools | |
| Display Modes | |
| |