I'm trying to use the logic for using SSIS
select top 2 * from table
How can I replace 2 with variable name and make it customize?
Update
I tried using expression and i received the following error:
I'm trying to use the logic for using SSIS
select top 2 * from table
How can I replace 2 with variable name and make it customize?
Update
I tried using expression and i received the following error:
Assuming that the variable that contains the number of top rows is named @[User::TopCount]
Create a variable of type string (example: @[User::strQuery]), set its property EvaluateAsExpression to True. And assign the following expression:
"SELECT TOP " + (DT_WSTR,10)@[User::TopCount] + " * FROM table"
Inside the data flow task add an OLEDB Source and set the Access mode to SQL Command from variable and use @[User:strQuery variable as source.
SSIS Expression for Variables section