Aggregate functions like 'max' in XQuery..
678452Feb 23 2009 — edited Feb 23 2009Hello,
I am trying to find the max of one of the fields in the table using XQuery aggregate function: fn:max as described in the below URL:
http://e-docs.bea.com/aldsp/docs30/xquery/sql_pushdown.html
Here is what I have:
declare $lineNo as xs:int :=
for $pd in ns4:getAllPalletDtls()
group $pd/LINE_NO as $line_group
by 1
return fn:max($line_group);
However, it's giving me error at line # 3 above:
Invalid expression: Expecting AS, found '/'
I am getting this error in ALDSP3.0.1 Aqualogic Data Service Studio.
Could someone please let me know what is wrong with the above code.
Thanks a lot,
Mamta