Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 is RAC in oracle?

7 Answers   MCN Solutions,


How do you create a db file?

0 Answers  


How do you declare a variable in pl sql?

0 Answers  


What are the datatypes available in pl/sql ?

0 Answers  


How do I view tables in mysql?

0 Answers  






Write a pl/sql script to display the following series of numbers: 99,96,93……9,6,3?

1 Answers  


Can a varchar be a primary key?

0 Answers  


What are the pre requisites?

1 Answers  


What is not equal in sql?

0 Answers  


what are ddl statements in mysql? : Sql dba

0 Answers  


Types of backups ?

3 Answers   TCS,


How is data stored on a disk?

0 Answers  


Categories