I found this in some source code today:
SELECT @Error = ERROR_NUMBER (), @ErrorMsg = N'An Error occured while populating the TABLE ' + @DestinationTableName + N' with data. Error Code: ' + CAST ( @Error AS nvarchar(20) ) + N', Error Description: "' + ERROR_MESSAGE () + N'".' + NCHAR(0X0D) + NCHAR(0X0A) + NCHAR(0X0D) + NCHAR(0X0A), @ErrorSeverity = ERROR_SEVERITY (), @ErrorState = ERROR_STATE () ;
It looks like the error message string is adding two line feeds after the description. 0X0D is 13 and 0X0A is 10.
Is there a reason to use hexadecimal instead of just integers?
Normally what I've done is NCHAR(13) + NCHAR(10)...