-16061   THE VALUE value CANNOT BE CONSTRUCTED AS, OR CAST (USING AN IMPLICIT OR EXPLICIT CAST) TO THE DATA TYPE data-type. ERROR QNAME = err:FORG0001

Explanation

An XQuery expression attempted to use the value value as a data-type value but the value is not valid for the data type. The following situations might cause this error:
  • A value was explicitly passed to a cast function or specified in a cast expression with a target data type of data-type.
  • An expression that included value implicitly cast the value to the target data type of data-type. Many XQuery expressions use implicit casting to process the expressions. For example, implicit casting is used in general comparisons of numeric values that require the values to be of data type xs:double.

System action

The XQuery expression cannot be processed.

Programmer response

Try one of the following actions:
  • If the error occurs in an expression that casts from one primitive type to another, verify that casting from the source type to the target type is supported. If the cast is not supported, either remove the expression or cast the value to a different data type.
  • Check for expressions that would result in implicit casting with values that may not conform to the data type of the implicit cast and add conditions to the expression to avoid the error.

SQLSTATE

10608