My variable is not working.
parameter coming in pErrorFlag = Y
variable: If '#pErrorFlag#' = 'Y' then 1 else 0
Constraint: vError = 1 abort 1 row
Please help
Moderators: chulett, rschirm, roy
Remove the single quotes from around the variable, i.e.
p.s. Welcome to DSXChange, but please use more meaningful subject lines in the future.
Code: Select all
If #pErrorFlag# = 'Y' then 1 else 0p.s. Welcome to DSXChange, but please use more meaningful subject lines in the future.
And you don't need to explicitly set the 1 or 0, the expression will evaluate to that automagically:
Is all you need.
Code: Select all
#pErrorFlag# = 'Y'Is all you need.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
</a>