Home » SQL & PL/SQL » SQL & PL/SQL » Connect_by error (
Connect_by error [message #426397] Thu, 15 October 2009 04:43 Go to next message
Messages: 64
Registered: October 2008
Location: Mumbai


Can anyone explain me what is this error??
"ORA-01436:CONNECT BY loop in user data"
I am getting this in one of the procedures.

Any idea how can i approach for it..

Thanks in advance
Re: Connect_by error [message #426399 is a reply to message #426397] Thu, 15 October 2009 04:53 Go to previous messageGo to next message
Kamran Agayev
Messages: 145
Registered: February 2009
Location: Azerbaijan, Baku
Senior Member

ORA-01436: CONNECT BY loop in user data
Cause: The condition specified in a CONNECT BY clause caused a loop in the query, where the next record to be selected is a descendent of itself. When this happens, there can be no end to the query.
Action: Check the CONNECT BY clause and remove the circular reference.
Re: Connect_by error [message #426400 is a reply to message #426397] Thu, 15 October 2009 04:57 Go to previous message
Messages: 12793
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why is this in server administration? It belongs in SQL & PL/SQL.

Anyway - you've got an infinite loop in your data.
Simple example:
Emp Id      Manager ID
1           2
2           1

You run a connect by query on that you'll get your error. You need to find the row with the erronous data and fix it.
If you're on 10g or above you can use nocycle
Previous Topic: Proc to return a REF CURSOR using dynamic SQL
Next Topic: how to attach a file?
Goto Forum:

Current Time: Sat Jul 22 17:55:29 CDT 2017

Total time taken to generate the page: 0.08551 seconds