1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Rep Power

    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')
    SQL> /
    ORA-01436: CONNECT BY loop in user data

    no rows selected

    Does anyone know what the problem may be?

  2. #2

IMN logo majestic logo threadwatch logo seochat tools logo