Hi,
I just needed to double check if there is a limit of characters on EXEC command in t-sql? If I have a variable with varchar(max) and execute the command using EXEC, you reckon that would be ok?
thanks
Hi,
I just needed to double check if there is a limit of characters on EXEC command in t-sql? If I have a variable with varchar(max) and execute the command using EXEC, you reckon that would be ok?
thanks
Should be fine, according to this MSDN article.
The relevant part:
Using EXECUTE with a Character String
In earlier versions of SQL Server, character strings are limited to 8,000 bytes. This requires concatenating large strings for dynamic execution. In SQL Server, the varchar(max) and nvarchar(max) data types can be specified that allow for character strings to be up to 2 gigabytes of data.