February 1, 2012 at 12:51 pm
Hello, possibly simple problem to solve, but I can't get it.
I have 2 variables I would like to access in an Execute SQL Task.
They are on the mapping page named 0 and 1 and are user variables with package scope.
inside the task, I have declared variables to receive the input var's values:
Declare @NewVar int (assume var 0)
Set @NewVar = ?
Declare @OtherVar int (assume var 1)
Set @OtherVar = ?
which works fine for first variable, but I'm not getting the value assigned to @OtherVar. Would I need to provide more identification as to which parameter??
I'm not clear on what syntax I would use in that case, something like "Parameters(1)" ?
Thanks in advance for getting me unstuck.
February 1, 2012 at 1:06 pm
Not sure, but have you tried using an expression, rather than parameters, to do this? Then you can quite clearly see where your variables are going.
You could also try something like (after declaration)
Select @NewVar = ?, @OtherVar = ?
- maybe it will work better because you are doing the entire assignment in one statement.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 1, 2012 at 2:54 pm
Thank you! that worked!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply