I have a stored procedure that does some processing
I wonder if on error I can retrieve the message in a variable
date1 datetime declare @
select @ date1 = '20211' (by mistake)
the query analyzer I have this message I want to recover:
Msg 241, Level 16, State 1, Procedure MyProcedure, Line 272
Failed to convert a datetime value from a character string.