FORG0006

An invalid argument was used in a function or operation. This can happen in three situations:

  • You passed an argument sequence to one of the sum or avg functions that contains values that are not numbers or durations, or that are a mixture of numbers and durations.

  • You passed an argument sequence to one of the min or max functions that contains values that do not support the < and > operators, or that have a mixture of different types.

  • You attempted to find the effective Boolean value of a multi-item sequence whose first item is an atomic value. Effective Boolean value is calculated when calling the boolean and not functions, but also in many different operations that do not involve functions, such as conditional (if-then-else) expressions, where clauses of FLWORs, and predicates of path expressions. Effective Boolean value is discussed in more detail in "Effective Boolean Value" in Chapter 11.

One common cause of this is using an expression like:

doc("catalog.xml")//product[1 to 3]

Although this expression is allowed by some XQuery processors, it is technically not valid because it attempts to find the effective Boolean value of a sequence of integers. Instead, you should use:

doc("catalog.xml")//product[position( ) = 1 to 3]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.195.225