Display Oracle Data in Hierarchical format [message #410146] |
Thu, 25 June 2009 08:13  |
|
Hi,
I would like to display Oracle 10g data in hierrachical format like:
Category
....SubCategory
......Brand
..........PormotedGroup
.............Product
I have an Oracle table with all of above fields. Can you please tell me which oracle 10g funcion or query should I use to display this data in the format above.
I just want to use either SQL or PL/SQL.
Thanks
MM
|
|
|
|
|
Re: Display Oracle Data in Hierarchical format [message #410168 is a reply to message #410166] |
Thu, 25 June 2009 09:15   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Then adjust the query accordingly. Select each column with the appropriate LPAD.
We can't see what data you have, so if you want a more detailed answer you will have to provide a test case according to the forum guide. (CREATE TABLE and INSERT statements that re-create the data you have)
|
|
|
Re: Display Oracle Data in Hierarchical format [message #410186 is a reply to message #410166] |
Thu, 25 June 2009 10:25  |
 |
Michel Cadot
Messages: 68734 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Post a working Test case: create table and insert statements along with the result you want with these data.
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).
Regards
Michel
|
|
|