hi all,
how to debug a stored procedure ..
Actually what i did was split the stored procs and took and SQL query and executed it...
but i dont knw how to print the values of these stored procs like for ex the below is th epart of the stored proc
If @ProcessId = 2
BEGIN
Update Vendors
Set ProcessId = 2
where Num = @Num
and RevNum <= @RevNum
and Code = @Code
and Error_Message = isnull(@error_M essage,Error_Me ssage)
--RETURN
END
Actaully i am not able to understand the line
Error_Message = isnull(@error_M essage,Error_Me ssage)
and like why it has cme with the where clause ...
when i try to print the value of error_message , it says to declare it first .After declaring also it still gives an error.
Can you please tell me how to go about and understand the logic of the entire stored proc one by one ....
thanks and Regards
Sanika
how to debug a stored procedure ..
Actually what i did was split the stored procs and took and SQL query and executed it...
but i dont knw how to print the values of these stored procs like for ex the below is th epart of the stored proc
If @ProcessId = 2
BEGIN
Update Vendors
Set ProcessId = 2
where Num = @Num
and RevNum <= @RevNum
and Code = @Code
and Error_Message = isnull(@error_M essage,Error_Me ssage)
--RETURN
END
Actaully i am not able to understand the line
Error_Message = isnull(@error_M essage,Error_Me ssage)
and like why it has cme with the where clause ...
when i try to print the value of error_message , it says to declare it first .After declaring also it still gives an error.
Can you please tell me how to go about and understand the logic of the entire stored proc one by one ....
thanks and Regards
Sanika
Comment