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

Answers were Sorted based on User's Feedback



How to write a procedure for displying the data in a TREE or (PARENT and CHILD ) relationship , fo..

Answer / 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

How to write a procedure for displying the data in a TREE or (PARENT and CHILD ) relationship , fo..

Answer / rv

You can use Select..ConnectBY.. PRIOR clause in Oracle to
generate the data in tree structure. Google for the apt
syntax and usage.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

What does 0 mean in sql?

0 Answers  


what are the advantages of sql ? : Sql dba

0 Answers  


How to Declare Fixed Length String Value In PL SQL

0 Answers  


How do I count records in sql?

0 Answers  


What are the advantages of sql?

0 Answers  






suppose we have values like 1 5 7 in a colum.Now we want numbers like(2 3 4 6) that exists between 1 5 7.How can we do this using sql query??

5 Answers   Keane India Ltd,


Why do we use sql constraints?

0 Answers  


What is procedure in pl sql?

0 Answers  


What is the first action to perform a query? Suppose I have four tables and five joins and my query is getting slow day by day.

4 Answers   Hexaware,


what is acid property in database? : Sql dba

0 Answers  


Why is theta join required?

0 Answers  


what is offset-fetch filter in tsql? : Transact sql

0 Answers  


Categories