Below is the XMLAGG xml aggregator function used for a different purpose,i.e for aggregating the strings.
SELECT * FROM TEST001
Result:
RULE_ID SEQ_NUM EXPR
----------------------------
GROUP_001 1 (
GROUP_001 2 GP
GROUP_001 3 +
GROUP_001 4 GM
GROUP_001 5 )
GROUP_002 1 (
GROUP_002 2 GP
GROUP_002 3 +
GROUP_002 4 GM
GROUP_002 5 )
SELECT
RULE_ID,
RTRIM(XMLAGG (XMLELEMENT (b, EXPR || '')).EXTRACT ('//text()'), ',') EXPR
FROM
TEST001
GROUP BY RULE_ID
Result:
RULE_ID EXPR
------------------------
GROUP_001 (GP+)GM
GROUP_002 (GP+)GM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment