I want to asssign the error messages generate inside the stored proedure to a local variable. Please suggest some way.
Here is an example
SELECT * FROM ThisObjectDoesNotExist
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'ThisObjectDoesNotExist'.
SQL server will show this mesage in SQL analyser , I want to assign this message directly to a variable.
Thanking you
Here is an example
SELECT * FROM ThisObjectDoesNotExist
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'ThisObjectDoesNotExist'.
SQL server will show this mesage in SQL analyser , I want to assign this message directly to a variable.
Thanking you