Start of change

-16041   AN IMPLICIT OR EXPLICIT INVOCATION OF THE fn:boolean FUNCTION IN THE XQUERY EXPRESSION COULD NOT COMPUTE THE EFFECTIVE BOOLEAN VALUE OF THE SEQUENCE. ERROR QNAME=err:FORG0006

Explanation

The effective boolean value of the argument passed to fn:boolean could not be computed. The effective boolean value can be computed only if the sequence operand is one of the following sequences:

  • An empty sequence
  • A sequence where the value of the first item is a node
  • A singleton sequence with a value of type xs:string, xdt:untypedAtomic or a type derived from one of these types
  • A singleton sequence with a value of any numeric type or derived from any numeric type

System action

The XQuery expression is not processed.

User response

No action is required.

Programmer response

Determine the possible expressions within the XQuery expression where an effective boolean value is calculated either implicitly or explicitly. An implicit invocation of the fn:boolean function can occur when processing the following types of expressions:

  • The logical expressions AND and OR
  • An fn:not function invocation
  • The WHERE clause of an FLWOR expression
  • Certain types of predicates, such as a[b]
  • Conditional expressions, such as IF

Ensure that the sequence operand of each effective boolean value calculation has a valid sequence operand, as described in the explanation.

SQLSTATE

10608

End of change