Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Converting the query into ABLOCAL format

189396Apr 9 2007 — edited Apr 9 2007
Hi

I am using following qry inside a tool that is having a problem parsing it:

SELECT deptno,
LTRIM(MAX(SYS_CONNECT_BY_PATH(ename,','))
KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
FROM (SELECT deptno,
ename,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) AS curr,
ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) -1 AS prev
FROM emp)
GROUP BY deptno
CONNECT BY prev = PRIOR curr AND deptno = PRIOR deptno
START WITH curr = 1;

Can it be converted to use ABLOCAL clause, that may solve the problem. I am not sure how to re-writw it using ABLOCAL clause.

Thanks
Shalu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2007
Added on Apr 9 2007
4 comments
885 views