How to get last full MS SQL Server error message?
- by JohnM2
I am aware of:
SELECT @@ERROR
but it will give me only an ERROR CODE (a number) and I need a full text message like:
Cannot insert duplicate key row in object 'dbo.TABLE_NAME' with unique index 'IX_ID_unique'.
The statement has been terminated.
How can I do that in MS Sql Server 2005 ?