You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xqueryversion"3.0";
let $data :=
<data>
<elem><x>1</x><y>b</y></elem>
<elem><x>2</x><y>a</y></elem>
</data>
let $ord-x := fn:true()
for $e in $data/elem
orderbyif ($ord-x) then $e/x else $e/y
return $e
But I get a parser error "Cannot resolve function 'if'".
The text was updated successfully, but these errors were encountered:
charlessimpson
changed the title
Parser error for conditional in order by
Parser error for conditional in "Order By"
May 23, 2017
XQuery allows an expression in an order by clause (https://www.w3.org/TR/xquery-30/#id-order-by-clause), for example:
But I get a parser error "Cannot resolve function 'if'".
The text was updated successfully, but these errors were encountered: