Length of expressions, variables, and SP arguments

The maximum size for expressions, variables, and arguments passed to stored procedures is 16384 (16K) bytes, for any page size. This can be either character or binary data. You can insert variables and literals up to this maximum size into text columns without using the writetext command.

When you upgraded Adaptive Server and the prior version used a lower maximum length:

Earlier versions of Adaptive Server had a maximum size of 255 bytes for expressions, variables, and arguments for stored procedures.

Any scripts or stored procedures that you wrote for earlier versions of Adaptive Server that used this old maximum may now return larger string values because of the larger maximum page sizes.

Because of the larger value, Adaptive Server may truncate the string, or the string may cause overflow if it was stored in another variable or inserted into a column or string.

If columns of existing tables are modified to increase the length of character columns, you must change any stored procedures that operate data on these columns to reflect this new length.

select datalength(replicate(“x”, 500)),	datalength(“abcdefgh....255 byte long string..” +	“xxyyzz ... another 255 byte long string”)----------- -----------255 	255