Good day earthlings,
This is my table structure
acctCode| refAcctCode | acctName
------ ---------- --------
AC001 SALES
AC002 AR
AC003 AC001 FURNITURE
AC004 AC003 OFFICE FURNITURE
AC005 AC002 INVOICE
AC006 AC001 UTILITIES
and expected output would be
SALES
FURNITURE
OFFICE FURNITURE
UTILITIES
AR
INVOICE
however it its not only limited on level 3 alone but to the nth
eg:
Parent1
Child1
child1.1
child1.1.1
child1.1.1.1
child2
child3
child3
parent2
child1
child2
child3
Given the table structure format, how do I query to get that output?
thanks