Reputation: 111
I have a FireBird SP that returns 3 output parameters to modify 3 fields
Then I call this sp with before update or insert trigger
I want now to check for a condition column value inside the SP if it is = 1 then the second output parameter must be left as it is with the user data and prevent the sp to change it
How I do that ?
The trigger:
execute procedure my_proc inp1, inp2 RETURNING_VALUES op1, op2, op3;
I don't want to return op2 and leave it as it is.
Thanks
Upvotes: 0
Views: 965
Reputation: 22759
The only way is to add third input parameter which takes the current value of the op2
and returns it in case of "condition column value = 1". IOW you add an "default value for the op2
" input parameter.
Upvotes: 1