none
xquery Msg 2395 There is no function

    Question

  • Why do I get the following TSql (v.2008R2) error message:
    Msg 2395
    XQuery [query()]: There is no function '{http://www.w3.org/2005/xpath-functions}:deep-equal()'

    when executing:

    DECLARE @xml XML;
    SELECT @xml = '<foo>bar</foo>'

    SELECT @xml = 
    (select @xml.query('
    declare namespace fn="http://www.w3.org/2005/xpath-functions";
    let $p := <foo>bar</foo>
    for $t in .
    where fn:deep-equal($t,$p)
    return $t
    '));

    when http://www.w3.org/2005/xpath-functions/ clearly lists deep-equal() as a function?

    Thursday, April 10, 2014 6:19 PM

Answers

All replies