This statement applies an aggregate function such as SUM to a variable that is defined as BYTE or TEXT. Such variables are not in the domain of the aggregate functions. Review the use of functions in the statement, and make sure that they are applied to the variables you intended.