December 31, 2008 at 1:27 am
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?
December 31, 2008 at 9:26 am
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.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply