February 25th, 2003, 10:07 PM
Oracle SQL statment
I am working on this project for school, and the question is "Using hierarchical retrieval, list then names of all the faculty bosses and their
subordinates. If the person is a boss, list the rank as "BOSS". If they are a subordinate, display their rank as peon."
I used this statement, and I get this error:
Wrote file afiedt.buf
1 select fname,
2 decode (BID, NULL, 'Boss', 'Peon') Rank
3 from faculty
4 connect by prior fid = bid
5* start with fname in ('Ellis Hugh', 'Debby Debit', 'Mike Crow Chip')
ORA-01436: CONNECT BY loop in user data
no rows selected
Does anyone know what the problem may be?
February 26th, 2003, 02:53 AM