Home » RDBMS Server » Server Administration » Hierarchy in sql
Hierarchy in sql [message #370534] Thu, 16 December 1999 19:16 Go to next message
Nagaraj
Messages: 11
Registered: December 1999
Junior Member
I wanted to display empno/mgr in a tree structure .i got the following error .
connect by loop in user data
my query was
select level,mgr,empno
from emp
connect by prior mgr=empno
start with empno=2 .
When there r no records in the table the error doesn't show up .
kindly clarify .
Re: Hierarchy in sql [message #370545 is a reply to message #370534] Fri, 17 December 1999 07:28 Go to previous message
hmg
Messages: 40
Registered: March 1999
Member
Hi,

this error is shown if you have a circular reference in the data.

example:
--------
empno 1 has mgr 2
empno 2 has mgr 3
empno 3 has mgr 1

this creates an infinite loop
1 = > 2 => 3 => 1 => 2 => 3 => 1 ....

Bye
Previous Topic: renaming tables, columns etc....
Next Topic: Urgent : ORA-01041: hostdef extension doesn't exist
Goto Forum:
  


Current Time: Fri Oct 23 17:24:57 CDT 2020