Monday, May 21, 2012

Dynamic SQL Command in ADO NET Source

In ADO NET Source there is no place to insert dynamic SQL command. (OLEDB Source there is SQL command from variable to insert dynamic SQL command).
As shows in following figure there are only two options in ADO NET Source.


 
 What you have to do is just go back to control flow and check the properties of Data Flow task that consist ADO NET Source.
 
Once you get the Expression Editor window you can set the [your ADO NET Source Name][SQL Command] as you want.




You can set a dynamic SQL command to a variable in earlier step. Then use that variable in Expression builder as shown below.

 

 That’s it!  It works fine .





No comments:

Post a Comment