select distinct gives ora-22950 error in sqlx query
562687Feb 19 2007 — edited Feb 19 2007Hello,
I'm trying to execute the following simple query:
SELECT DISTINCT
XMLElement("lineitems",
XMLAgg
(
XMLElement("lineitem",
XMLForest
(
xsv2.QUANTITY as "quantity",
xsv2.SUPPLYTYPE as "supplytype"
))
))
FROM
xpressshipment_view xsv2
WHERE
xsv2.REFERENCE = '48'
GROUP BY
xsv2.QUANTITY,
xsv2.SUPPLYTYPE
The view has the following relevant records:
reference quantity supplytype
-------------- -------------- --------------------
48 3 1006
48 3 1006
48 3 1006
48 10 X00413
When executing this statement I get the following error:
XMLElement("lineitems",
*
ERROR at line 2:
ORA-22950: cannot ORDER objects without MAP or ORDER method
Why am I getting this error?