I am using a stored procedure to perform my logic which has 2 mandatory parameters and 1 optional parameter having default value as 0 (INT).
When i am calling the procedure, i also pass the optional parameter as 1.
On debugging the stored procedure i found that the optional parameter still takes value as 0 . I have compiled the procedure many times but no success.
Kindly help me why such random behaviour of SQL server.Also how can I solve this issue ??Thanks Tushar
asked Oct 15 '12 at 07:07 PM in Default
I have studied and debugged the procedure and found that there was a recursive call to the same procedure where in the optional parameter was not passed during the recursive call thereby resetting its value to 0.Thank u all for your support.
answered Oct 16 '12 at 05:33 PM
So, you should have a procedure declaration such as:
Now, in the body of the SP, are you overwriting
answered Oct 15 '12 at 07:49 PM