Msg 8169, Level 16, State 2, Line 1
Conversion failed when converting from a character string to uniqueidentifier.
This error message appears when you try to convert an invalid character string to uniqueidentifier.
The T-SQL statement can be parsed, but causes the error at runtime.
Error of the Severity level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be run this way. Only valid character strings can be converted to uniqueidentifier.
All versions of SQL Server.
SELECT CAST(‘1’ AS uniqueidentifier)
In the above example we try to convert the character string ‘1’ to uniqueidentifier. This raises the error.