How to write a procedure for displying the data in a TREE
or (PARENT and CHILD ) relationship , for ex: A is the main
project id, for this project B,C,D are sub tasks(sub
project id's) for B the sub tasks are e,f,g and for c is
h ,i ,j and for d is k,l,m
now i need to display the o/p in a TREE fashion

pls help me ,
thanks in advance
surendra

Answer Posted / hussain

hi,
i think this may help u,


select lpad('',level*4)||projectid,subtask from xyz
start with projectid ='&a' connect by prior projectid=subproid

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is foreign key mandatory?

565


Is join and inner join the same?

551


In what condition is it good to disable a trigger?

564


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

554


Which is better cte or subquery?

550






How does a self join work?

526


Inline the values in PL/SQL, what does it mean.?

641


Explain constraints in sql?

578


How does a covering index work?

539


What is a database trigger?

621


Which join is like an inner join?

535


Why do we use partitions in sql?

552


What is normalisation in sql?

557


What is pl/sql table? Why it is used?

569


How many types of normalization are there?

497