I have a table with the colums:
FirstName LastName TemporaryID PermanentID
Harry Potter 12345 NULLL
RAM R 5678 NULL
The above column is being updated with the help of the stored procedure .
I am writing a stored procedure and within this stored procedure i'm calling other stored proc to update PermanentID column in the above table.
i'm using while loop for this/
Within while loop i'm calling the other stored procedure and updating this column for each record .
But , just in case during the process if there is any problem , I dont want to come out the loop instead I want to log the error message into a table and continue looking for the next record.
But,since I am using the stored procedure wiht try and catch block it automatically goes to catch and the process stops .
How can log the errror message within the TRY BLOCK .
try to create RaiseError in your inner procedure which is updating your permanentID in the loop.
in the RaiseError you need to give low severity level.
Thanks & Regards Prasad DVR