DSNH120I E csectname LINE nnnn COL cc FUNCTION USAGE NOT PERMITTED: fname

Explanation

A WHERE clause or SET clause contains an aggregate function, possibly as a result of a reference to a column that is derived from an aggregate function in a view definition. An aggregate function is allowed in a WHERE clause only if that clause appears within a subquery of a HAVING clause.

System action

If the containing SQL statement is a declaration, it is discarded. If the containing SQL statement is executable, it is replaced by host language statements that will, if executed, set an error code in the SQLCA.

User response

Correct the syntax. A subselect clause might be needed to produce the function result.

Severity

8 (error)