distinct in oracle xmlagg
Posted on 2011-02-24
Experts.. I have a query which is below
select rtrim(EXTRACT(XMLAGG (XMLELEMENT("s",a.src_id|| ',' )), '/s/text()').getstringval())
from cfs a, cdr b
where b.emp_oid = 235
and b.enty_id= a.enty_id;
This is getting the list but some of the elements in the list are duplicates. for ex: when I print out the v_src_id_list I have 1,2,3,3,4,4,5 in it.
Is there any way to eliminate the duplicates in this list?