-16001   AN XQUERY EXPRESSION STARTING WITH TOKEN token CANNOT BE PROCESSED BECAUSE THE FOCUS COMPONENT OF THE DYNAMIC CONTEXT HAS NOT BEEN ASSIGNED. ERROR QNAME = err:XPDY0002

Explanation

Evaluation of the expression starting with token token requires that the focus component of the dynamic context be assigned. The token is being considered as the beginning of a path expression which does not have an associated context item or context sequence. This might be the result of not specifying an XQuery context item expression in the passing clause or the value of the XQuery context item expression is a null value. Another common cause of this error is that the value in the XPath expression was intended to be a literal string but delimiting quotation characters are missing.

System action

The XQuery expression cannot be processed.

Programmer response

Pass a value that is not null as the XQuery context item expression to XMLQuery or XMLExists.

SQLSTATE

10501