Reputation: 3974
I am looking to output a scalar value from a T-SQL task (select max(ID) from...) and use that to pull data from another server. I am sure I can write a script task to retrieve that value into a variable and use it in the data flow task, but it seems that there should be a simpler way.
Any suggestions?
Update:
In addition to billinkc's answer, I found this tutorial which was very helpful:
http://sqlfool.com/2009/08/getting-started-with-variables-in-ssis/
Upvotes: 2
Views: 9039
Reputation: 61211
Parameterize your query like so to use the value you saved off from the Execute SQL task.
Set parameters here.
Upvotes: 3