There are 2 Option to use dynamic query in Execute SQL Task
, Parameter Mapping and Expression.
Variable
- where you create query on a variable eg "Select * from" +@User::TableName
Expression
- where you create query direct to expression, same sample above.
Questions is which of the 2 is mostly used or better to use since this 2 have the same output?
You can use the Execute SQL Task
for your case using variable or expression. There is nothing like which is better. It all depends on your requirement. Both of the options have its pros and cons, so it is hard to predict which is better in your case without knowing your requirement.
You may check
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.