| to get the results in the form of a tree [message #571395] |
Sun, 25 November 2012 09:35  |
mr.rajeshyadav
Messages: 48 Registered: November 2007
|
Member |
|
|
Hi,
My table structure is like this
CREATE TABLE Tab1(LVL1_NM VARCHAR2(20), LVL2_NM VARCHAR2(20), LVL3_NM VARCHAR2(20), LVL4_NM VARCHAR2(20)) and the values will be for one value of LVL1_NM there will be different LVL2_NM values like wise for each and every value of LVL2_NM column there will different values in LVL3_NM column like wise for LVL4_NM now can you please tell is there any way to get the results as per their relation ships.
please have a look at the image attached to show how i am expecting results.
Thanks,
Rajesh.
-
Attachment: IMG2.png
(Size: 11.33KB, Downloaded 89 times)
[Updated on: Sun, 25 November 2012 09:36] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
| Re: to get the results in the form of a tree [message #571412 is a reply to message #571405] |
Sun, 25 November 2012 12:48   |
 |
dariyoosh
Messages: 229 Registered: March 2009 Location: Iran / France
|
Senior Member |
|
|
"mr.rajeshyadav"... can you please tell is there any way to get the results as per their relation ships ...
In addition, strictly speaking, from a graph theory and data structure point of view, the picture you provided is not a tree, as the 7th node (counting from up downwards) in the third level has two parents whereas a tree is an acyclic graph. Consequently, are you sure what you're looking for, can be presented as a tree?
Regards,
Dariyoosh
[Updated on: Sun, 25 November 2012 12:49] Report message to a moderator
|
|
|
|
|
|
| Re: to get the results in the form of a tree [message #571469 is a reply to message #571466] |
Mon, 26 November 2012 03:59  |
 |
Michel Cadot
Messages: 54167 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Michel Cadot wrote on Sun, 25 November 2012 18:17With any SQL or PL/SQL question, please, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Regards
Michel
|
|
|
|