Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incremental Load

Status
Not open for further replies.

aikman

IS-IT--Management
Mar 10, 2003
4
SE
Hi,

Am a newbie in SSIS and need help with following:

Have a load and the last step in the Control Flow I update LastImportDate in a Table

update ParamSettings set
value = convert(date,getDate(),120)
where ParamID = 1 and Parameter = 'LastImportDate'

Next time I run the SSIS package I want to check LastImportDate value in that table and only load Incremental data.

Source and destination databases are on different servers

Have tried with Lookup but can´t understand how to check one cell for all rows in source table.

Have search google, but cant find any solution, I hope I have give enought info.

Thanks

Aikman

 
The simple way is something like that
in Data flow source you running SQL somthing like

select field1,
field2,
field3,
field4,
field5,
field6,
field7,
...........
fieldN
from sourceTabel

You need to change
to
Declare @LastImportDate date

select @LastImportDate = value
from ParamSettings
where where ParamID = 1 and Parameter = 'LastImportDate'

select field1,
field2,
field3,
field4,
field5,
field6,
field7,
...........
fieldN
from sourceTabel
where changeDate > LastImportDate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top