XQuery - 排序顺序不正确

时间:2012-07-28 01:15:15

标签: xquery flwor

Order by子句似乎不起作用。我有正确的xquery查询吗?

for $record in doc('XQuery.xml')/dataroot/RecentIndices_solarFlux 
where $record/Month = 1 or
        $record/Month = 2
order by $record/Geomagnetic_Smoothed_Ap
return $record

我得到的输出是这样的:

-1,10.5,11.6,5,8.7

我正在使用Stylus Studio X14第2版XML Enterprise Suite。

1 个答案:

答案 0 :(得分:1)

我发现问题是因为我使用了十进制数字,所以我按顺序用xs:decimal(exp。)包围了路径。

相关问题