It's exceeding the maximum row size because the column is defined as LATIN and your session character set is UNICODE and/or you ORDER BY some of those columns. The calculation is based on the possible, but not the actual size, if you SUBSTRING a VRACHAR(4000) the possible max length is still 4000.
This is a know pproblem, which will be fixed in TD14.10 which introduces 1 MB spool rows.
Dieter
It's exceeding the maximum row size because the column is defined as LATIN and your session character set is UNICODE and/or you ORDER BY some of those columns. The calculation is based on the possible, but not the actual size, if you SUBSTRING a VRACHAR(4000) the possible max length is still 4000.
This is a know pproblem, which will be fixed in TD14.10 which introduces 1 MB spool rows.
Dieter