Link to home
Start Free TrialLog in
Avatar of jvoconnell
jvoconnell

asked on

ISLEAF explanation

Experts,

I am a beginner with these functions and I'm hoping someone can explain the ISLEAF results in this query. The results are producing the correct hierarchy.

SELECT ETC_ID,    SYS_CONNECT_BY_PATH(etc_id, '$') ids,
                   SYS_CONNECT_BY_PATH(etc_name, '$') names,
                   CONNECT_BY_ISLEAF isleaf
              FROM ETC_TBL
              WHERE ETC_RETIRED_IND = 0
        CONNECT BY ETC_PARENT_ETC_ID = PRIOR etc_id
        START WITH ETC_PARENT_ETC_ID = 0

I attached a sample Excel output of a few records.
I am wondering why the first 2 records have ISLEAF = 0 (High level explanation of why I should expect that result)
isleaf-example.xlsx
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jvoconnell
jvoconnell

ASKER

Thank you. I did check online before posting but was strictly limiting myself (out of frustration) to "isleaf".  On the specific link you posted, the "LEVEL" psuedocolumn helped clarify things. I appreciate your time, you helped me out once again.