The current RETURN statement contains an expression that evaluates to a character string longer than 512 characters. This situation is not supported. Review the logic of the function, and modify it so that it does not return such a long character value. You can assign a longer string to a global variable.