-16022 OPERANDS OF TYPES xquery-data-types ARE NOT VALID FOR OPERATOR operator-name . ERROR QNAME = err:XPTY0004
Explanation
One or both operands of the operator have invalid
data types. The following situations might cause this error:
- The types of the operands are not a valid combination for the given operator. For example, the operands of an arithmetic operator are not of numeric types. Or a comparison operator compares xs:string with xs:integer.
- One or both operands of an arithmetic operator are a sequence of more than one items, but the given operator requires single item operands. The notation (item(), item()+) represents the type of a sequence of more than one item.
- The content sequence of a document node constructor (e.g XMLDOCUMENT) cannot contain attribute nodes.
System action
The XQuery expression cannot be processed.
Programmer response
Use operands that have the correct types for the operator.
SQLSTATE
10507