Msg 2739, Level 16, State 1, Line 1
The text, ntext, and image data types are invalid for local variables.
This error message appears when you try to declare of one of the aforementioned types.
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 executed this way. These data types are not valid for variable declarations.
All versions of SQL Server.
DECLARE @t TEXT
In the above example we try to declare a variable of the TEXT type. This raises the error.