Adding UDF_ReplaceStr to more than 4 columns of an existing query throws error SELECT Failed. 3577:
I am trying to add a UDF (UDF_ReplaceStr) existing query that has been working for some time. As long as I am adding it to four or less of the columns it is OK but it throws the error "SELECT Failed. 3577: Row size or Sort Key size overflow." when adding it to the fifth.
Re: Adding UDF_ReplaceStr to more than 4 columns of an existing query throws error SELECT Failed. 3577:
Just a guess: The answer may have something to do with the result type of your UDF.
The parser calculates the result row size using the maximum size of the result column values. Suppose the declared result type of your UDF is something like VARCHAR(15000), then 4 columns of that type are assumed to use a total of 60000 bytes in the worse case. If you try to add a 5th value of the same type, it will exceed the maximum row size.