-16066   THE ARGUMENT PASSED TO THE AGGREGATE FUNCTION function-name IS NOT VALID. ERROR QNAME = err:FORG0006

Explanation

The argument that was passed to the aggregate function function-name is not valid because the argument does not meet any of the conditions that are required for arguments to the function function-name.

System action

The XQuery expression cannot be processed.

Programmer response

If the function is fn:sum, verify that the following conditions are met:
  • All items in the input sequence must be numeric or derived from a single base type.
  • The type must support addition.
  • The values must all be promotable to a single common type if the input sequence contains numeric values.

SQLSTATE

10608