chickanna
asked on
distinct in oracle xmlagg
Experts.. I have a query which is below
select rtrim(EXTRACT(XMLAGG (XMLELEMENT("s",a.src_id|| ',' )), '/s/text()').getstringval( ))
into v_src_id_list
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?
select rtrim(EXTRACT(XMLAGG (XMLELEMENT("s",a.src_id||
into v_src_id_list
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER