May 14, 2009 at 11:17 am
How do pass variables to a sql statement in a lookup transform?
I have a package that I'm putting together... and at the beginning of the package I load up several variables with values from a table... then later in the package, I want to do use a lookup transform, where I lookup some records in another table based on one of the variables that I populated previously... I may be missing something obvious here, but how do I set this up?
May 14, 2009 at 1:24 pm
One way to get user variables into the column list is to use a derived column transformation above your lookup in the data flow, such as :
Derived Column Name: MyVar
Derived Column: add as new column
Expression: @[User::MyVar]
Then in the lookup, on the 'Columns' tab, the MyVar column will be available as an Available Input Column.
I hope that this is what you were looking for, I don't know of a way to make a user variable part of the reference table query itself.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply