Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#715 XQuery order by type error

v8.9
closed
Michael Kay
5
2012-10-08
2007-08-02
Michael Kay
No

An XQuery FLWOR expression with an order by clause may fail with a message such as

XPTY0004: Non-comparable types found while sorting:
net.sf.saxon.value.Int64Value cannot be cast to net.sf.saxon.value.StringValue

There are two necessary conditions: (a) the data type of the sort key must be something other than string or untypedAtomic, and (b) the FLWOR expression must not be at the outermost level of the query or of a function body.

A patch is being placed in Subversion.

Discussion

  • Michael Kay
    Michael Kay
    2007-11-04

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.1