|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
join across branches in tree structure
I have the following tree structure that allows the lowest level to have multiple parents. Basically, I am using the tree to categorize documents.
id name parent_id 1 parent null 2 language 1 3 cobol 2 10 doc3 3 8 doc1 3 4 java 2 11 doc4 4 9 doc2 4 5 resource_type 1 6 techdocs 5 10 doc3 6 11 doc4 6 7 manuals 5 8 doc1 7 9 doc2 7 Now i want to give a list of documents for cobol arranged by resource type such that my output looks like this: language coboltechdocdoc3manualdoc1 Is it possible to do this via a single sql query? |
|
#2
|
|||
|
|||
|
Hi Steeve
Use CONNECT BY AND START WITH.. Regards Sasidhar.P |
|
#3
|
|||
|
|||
|
well, connect by and start with will get me the whole tree, or parts of the tree, but I want to join two branches of the treen.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > join across branches in tree structure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|