Home » RDBMS Server » Server Administration » connect by prior
connect by prior [message #373580] Tue, 24 April 2001 10:20 Go to next message
Rhodius
Messages: 3
Registered: April 2001
Junior Member
Is there any to find out which node is causing the
"ORA-01436 : Connect by loop in user data" error without looking at the data.
Re: connect by prior [message #373592 is a reply to message #373580] Wed, 25 April 2001 08:56 Go to previous messageGo to next message
Krishnan
Messages: 18
Registered: October 2000
Junior Member
I think there is atleast a row that has parent_id and child_id has same value or has a circular reference for instance it could be in the following manner

Parent_id Child_id
1 1
or
1 2
2 3
3 1

both are wrong

-- KRishnan
Re: connect by prior [message #373622 is a reply to message #373580] Fri, 27 April 2001 08:46 Go to previous messageGo to next message
Rhodius
Messages: 3
Registered: April 2001
Junior Member
Actually, I was wandering if there was any way programmatically to determine which record is causing the error. For example
parent_id child_id
1 2
2 3
3 2
4 3
5 6
6 1

SELECT parent_ID FROM table
Start With parent_id = 1
CONNECT BY parent_id = PRIOR child_id
UNION
SELECT parent_ID FROM table
Start With parent_id = 1
CONNECT BY child_id = PRIOR parent_id
ORDER BY 1;
produces the ORA-01436. I would like to handle the exception knowing that 2,3 is causing the problem.
Re: connect by prior [message #373623 is a reply to message #373580] Fri, 27 April 2001 08:51 Go to previous message
Rhodius
Messages: 3
Registered: April 2001
Junior Member
Actually, I was wandering if there was any way programmatically to determine which record is causing the error. For example
parent_id child_id
1 2
2 3
3 2
4 3
5 6
6 1

SELECT parent_ID FROM table
Start With parent_id = 1
CONNECT BY parent_id = PRIOR child_id
UNION
SELECT parent_ID FROM table
Start With parent_id = 1
CONNECT BY child_id = PRIOR parent_id
ORDER BY 1;
produces the ORA-01436. I would like to handle the exception knowing that 2,3 is causing the problem.
Previous Topic: Please Help : Unicode
Next Topic: Page Number in Reports
Goto Forum:
  


Current Time: Tue Jul 02 16:58:43 CDT 2024