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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Need help in resolving CONNECT BY loop in user data in Oracle 9.2.0.5 Ver

432862Mar 24 2009 — edited Nov 2 2010
Hi Everyone,

Below are the scripts to reproduce the error

CREATE TABLE TESTING
(
C1 NUMBER,
C2 NUMBER,
GRP NUMBER
);


Insert into TESTING
(C1, C2, GRP)
Values
(1, 2, 100);
Insert into TESTING
(C1, C2, GRP)
Values
(1, 3, 100);
Insert into TESTING
(C1, C2, GRP)
Values
(2, 5, 200);
Insert into TESTING
(C1, C2, GRP)
Values
(3, 11, 200);
Insert into TESTING
(C1, C2, GRP)
Values
(11, 1, 400);
COMMIT;

SELECT sys_connect_by_path(C1,'/') AS C1,C2
FROM TESTING
CONNECT BY C1 = PRIOR C2

I am getting "ORA-01436: CONNECT BY loop in user data" because of Recurssion.

My Oracle Version is 9.2.0.5, can you guide me how to resolve in 9.2.0.5
In Oracle 10g I have read that we can achieve through NOCYCLE option

Can you please guide me how to solve this in Oracle 9.2.0.5 Version

Thanks in Advance,
Sankar

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 3 2009
Added on Mar 24 2009
29 comments
50,572 views