Please refer the following script.... CREATE TABLE TMAST (PARENT VARCHAR2(50), CHILD VARCHAR2(50)); INSERT INTO TMAST VALUES ('', 'ASSETS'); INSERT INTO TMAST VALUES ('ASSETS', 'FIXED ASSETS'); INSERT INTO TMAST VALUES ('FIXED ASSETS', 'FIXED ASSETS ( GROSS BLOCK )'); INSERT INTO TMAST VALUES ('FIXED ASSETS ( GROSS BLOCK )', 'BUILDING & STORES A/c'); INSERT INTO TMAST VALUES ('BUILDING & STORES A/c', 'BUILDING A/c. (ASSET)'); INSERT INTO TMAST VALUES ('BUILDING & STORES A/c', 'STORES (ASSET) A/c'); INSERT INTO TMAST VALUES ('FIXED ASSETS ( GROSS BLOCK )', 'LAND (ASSET) A/c'); INSERT INTO TMAST VALUES ('LAND (ASSET) A/c', 'LAND (No.413) OLD ASSET'); INSERT INTO TMAST VALUES ('LAND (ASSET) A/c', 'LAND (No.19,20 AT BRINDAVAN ALLOYS) '); I want the output like the following.. is it possible... PARENT CHILD ------------------------------------------------------------------------- ASSETS FIXED ASSETS ASSETS FIXED ASSETS ( GROSS BLOCK ) ASSETS BUILDING & STORES A/c ASSETS BUILDING A/c. (ASSET) ASSETS STORES (ASSET) A/c ASSETS LAND (ASSET) A/c ASSETS LAND (No.413) OLD ASSET ASSETS LAND (No.19,20 AT BRINDAVAN ALLOYS) FIXED ASSETS FIXED ASSETS ( GROSS BLOCK ) FIXED ASSETS BUILDING & STORES A/c FIXED ASSETS BUILDING A/c. (ASSET) FIXED ASSETS STORES (ASSET) A/c FIXED ASSETS LAND (ASSET) A/c FIXED ASSETS LAND (No.413) OLD ASSET FIXED ASSETS LAND (No.19,20 AT BRINDAVAN ALLOYS) FIXED ASSETS ( GROSS BLOCK ) BUILDING & STORES A/c FIXED ASSETS ( GROSS BLOCK ) BUILDING A/c. (ASSET) FIXED ASSETS ( GROSS BLOCK ) STORES (ASSET) A/c FIXED ASSETS ( GROSS BLOCK ) LAND (ASSET) A/c FIXED ASSETS ( GROSS BLOCK ) LAND (No.413) OLD ASSET FIXED ASSETS ( GROSS BLOCK ) LAND (No.19,20 AT BRINDAVAN ALLOYS) BUILDING & STORES A/c BUILDING A/c. (ASSET) BUILDING & STORES A/c STORES (ASSET) A/c LAND (ASSET) A/c LAND (No.413) OLD ASSET LAND (ASSET) A/c LAND (No.19,20 AT BRINDAVAN ALLOYS)