DISTINCT in XMLQuery ??
602335Oct 31 2007 — edited Nov 9 2007Hi ! I have a problem with duplicate values. So I thought I could get rid of them by using DISTINCT. But I don't know where to place it :(
Thats my Statement:
select XMLElement
("Table1",
XMLElement
("Table1_ITEM", XMLForest(--elements--) )
,
XMLElement
("Table2",
XMLAgg ( XMLElement
( "Table2_ITEM", XMLForest(--elements--) )
)
,
XMLElement
("Table3",
XMLAgg
(XMLElement
("Table3_ITEM", XMLForest(--elements--) )
)
)
))).getClobVal() AS XML
FROM Table1, Table2, Table3
WHERE Table1.ID = Table2.ID AND Table2.ID = Table3.ID
AND Table1.ID = 9439
GROUP BY table1 elements
The Statement works fine but I'm getting duplicate values :(
So do you have any ideas that could help to solve my problem??
Any help would be appreciated
thanks
bang