|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, February 11, 2011 7:01 AM
Points: 91,
Visits: 198
|
|
i want to execute a stored which takes a parameter. i am using a SSIS variable and passing it to the query through a variable expression.
Could you please let me know how do i put a parameter in a query?
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: 2 days ago @ 8:25 AM
Points: 1,467,
Visits: 922
|
|
using a parameter in a query using ssis is fairly simple.
For every place you want a parameter use a ? in place of a variable name.
The variables are used in order that you have them in your query.
For example
Select Mycol1, MyCol2 FROM MyTable Where MyCol3 between ? and ?
This uses 2 parameters. On your execute sql task select Parameter Mapping. and add a new Variable for every ? in your query. SSIS Evaluates these by ordinal, Meaning Parameter 0 is the first ? and Parameter 1 is the second? On a side note Change the name of the Parameter to be just 0. and 1 Respectively If I have Confused you Check this page out. http://www.sqlis.com/post/The-Execute-SQL-Task.aspx
|
|
|
|