SSIS Lookup
How to make Schema name Dynamic in SSIS Lookup Select Query? E.g., Select Customer_ID From Dbo.customers Means dbo schema can be changed to rpt or abc or pqr etc....
August 11th, 2011 1:00pm

I haven't try but it must be possible to set the sql command of the Lookup Task before executing the DF via expression. In DF it is not possible.
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2011 1:59pm

It is possible to set an expression on the Lookup's "SqlCommand" property so that the lookup command is dynamic. Click on the data flow background, then open the properties window (F4). Look for a property called "Expressions", open that, click the ellipsis button (...), find the [<name of your lookup component>].[SqlCommand] property, then type in a valid expression. Talk to me now on
August 11th, 2011 2:04pm

Hi Can u try using , package Configurations(dtsConfig Or sqlServer Config) to achieve this. modify the [Lookup].[SqlCommand] property Of Lookup Component.Since it has the Query rajiv
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2011 3:00pm

I appriciate your help Todd, can you please send me any link so that I can do step by step by looking into the link Thanks, Lala
August 11th, 2011 4:10pm

create a variable for schema, of type string in package scope, name it Schema set a default value for it also then click on the data flow task which contains lookup component inside, then in properties window, find the expression, click on ellipsis button in front of it, then in new dialog box, select the [Lookup].[SqlCommand] property there, and set the expression as below: "Select Customer_ID From "+@[User::Schema]+".customers"http://www.rad.pasfu.com My Submitted sessions at sqlbits.com
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2011 5:20pm

Thanks Todd and Reza, It worked...
August 12th, 2011 9:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics