I have been working on SSIS for quite some time now but today i came to know about the use of dynamic query in LookUp control. Normally when earlier i used to face a similar situation,i normally rely on OLE DB Source control which facilitates the dynamic query(though it required Merge control as well )
I will demonstrate the way i have implemented this in my project.Below are the steps that i have followed:
- Create a variable – SqlEvalType of type string to hold the query to be evaluated at run-time (select id,entity_id,eval_date from hr_evalinfo where eval_type = ‘” + @[User::EvalType] + “)
- Now go to the properties of the DFT which holds the LookUp control and click on the Expression as shown by red arrow on the screenshot below . It will opens the editor window
- Select the SqlCommand property of the LookUp Control name (here it is LKP PersonEval) and assign the variable created in step 1.
- Now we are done. Execute the package and it will show the desired result.
Prashant
Leave a comment