Link to home
Start Free TrialLog in
Avatar of chickanna
chickannaFlag for Afghanistan

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?
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chickanna

ASKER

thank you experts.