Skip to Main Content

Oracle Database Discussions

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!

ORA-32031: illegal reference of a query name in WITH clause

720666Apr 30 2010 — edited Jan 7 2013
Oracle tutorial : http://www.oracle.com/technology/pub/articles/hartley-recursive.html#4

When Executing this Query 6: Using a Recursive WITH Clause

WITH C (CNO, PCNO, CNAME) AS
(SELECT CNO, PCNO, CNAME -- initialization subquery
FROM COURSEX
WHERE CNO = 'C22' -- seed
UNION ALL
SELECT X.CNO, X.PCNO, X.CNAME -- recursive subquery
FROM C, COURSEX X
WHERE C.PCNO = X.CNO)
SELECT CNO, PCNO, CNAME
FROM C;

Error: ORA-32031: illegal reference of a query name in WITH clause

kindly suggest what need to do in case of recursion using subquery
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2013
Added on Apr 30 2010
8 comments
4,748 views