I am creating an ETL in SSIS in which I which I want my data source to be a restricted query, like select * from table_name where id='Variable'
. This variable is what I defined as User created variable.
I do not understand how I can have my source query interact with the SSIS scoped Variable.
The only present options are
What I want is to have a SQL statement having a variable as parameter
Simple. Choose SQL command
as the Data Access Mode. Enter your query with a question mark as a parameter placeholder. Then click the Parameters
button and map your variable to Parameter0
in the Set Query Parameters
dialog:
More information is available on MSDN.