Dear all,
I'm trying to write a dynamic query and I need a local variable with 8000 chars long.
sql server forces me to use nvarchar of which max size is 4000:
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
DECLARE @sql NVARCHAR(4000);
And when I use ntext instead, I get this error:
The text, ntext, and image data types are invalid for local variables.
What else I can use?
Thanks