AboutElliot Mak Expertise I can answer questions with regarding to Oracle DB (8i, 9i, 10g) installation, configuration, administration, Data Guard, SQL, and PL/SQL (Procedures, triggers, functions).
Experience I am an Oracle DBA, Senior PA, Project Manager, and Data Architect with 10 years of experience.
My requirement is to get all child, subchild of parent record.
Consider this explanation:
I want all the form functions attached to responsibility.
Generally form functions are attached to menus and menus are attached to responsibility.I have a input parameter as responsibility name. I am getting immediate child records but I have to get subchild of child records also and it can go to any level.
Can you please suggest me way to write SQL Query to get all the childs,subchilds of parent record.
Answer Good day Roshan
To get the parent, child, and subchild is pretty straight forward with SQL. In the example below, there are
1. Three tables (Parent, Child, and Subchild tables)
2. Data inserted for all the three tables
3. SQL statement to retrieve all child, and subchild for all the parent
************************
Example starts here
************************