Hello I'm have a query that's taking a Failure 2805 ENTDW_IN_PRT_ACV2IN_PRT_ACV_SP:Maximum row length exceeded in ..... error. Bascially, I have eight VARCHAR(4000) columns in the table which is what's causing the issue. Not all of the 4000 bytes will be fully popualted at any point in time. Therefore, I'm doing a substr for the length of the col itself using the CHARACTER_LENGTH function. Such as
SUBSTR(PRIOR_INCIDENT_OF_CAN_TXT,1,CHARACTER_LENGTH(PRIOR_INCIDENT_OF_CAN_TXT))
What I've found is that if I explicitly set the length parameter of the SUBSTR to a value that I know is longer than the number of data characters in the column it works great. However, if I code the statement above it won't work. I've also tried every conceivable combination of the string manipulation and I can't get it to work unless I explicitly code the length. I've even tried setting the length into a variable outside the query and using the variable in the SUBSTR and it still won't work.
Do you have any suggestions that will get the SUBSTR to work without explicitly coding the value?