Re: get distinct values
From: webtourist <webtourist_at_gmail.com>
Date: Thu, 25 Mar 2010 12:58:47 -0700 (PDT)
Message-ID: <3e26239a-4b2f-4cde-8a79-9c80488dd23e_at_35g2000yqm.googlegroups.com>
solution found:
Date: Thu, 25 Mar 2010 12:58:47 -0700 (PDT)
Message-ID: <3e26239a-4b2f-4cde-8a79-9c80488dd23e_at_35g2000yqm.googlegroups.com>
solution found:
SELECT deptno,
substr(REPLACE(REPLACE(xmlagg(xmlelement("x", job) ORDER BY job), '</x>'), '<x>', ' '), 2) job_list,
wmsys.wm_concat(DISTINCT job) job_list_distinct
FROM emp
GROUP BY deptno
ORDER BY deptno
I win :) Received on Thu Mar 25 2010 - 14:58:47 CDT