Home » SQL & PL/SQL » SQL & PL/SQL » Hierarchical Query question
Hierarchical Query question [message #296663] Mon, 28 January 2008 10:22 Go to next message
Messages: 24
Registered: June 2006
Junior Member
Hi fellows,

i have a question regarding CONNECT_BY:

The table has 4 columns.

1, 10, 'test','test2'
1, 10, 'asdasd',''
1, 11, 'asd',''
2, 50, 'qwewqe',''
2, 51, 'asddsa','asddsa'
2, 51, 'tzuzt','ewrewr'

I want to have the following result:
1,10,'test, test2' <- both descriptions concatenated with comma.
1, 11, 'asd','' <- only one invoice number, so nothing to concatenate
2, 50, 'qwewqe','' <- only one invoice number, so nothing to concatenate
2, 51, 'tzuzt, ewrewr' <- same as first result row

i am sorry, that i can not supply any source code at the moment Sad

Thanks a lot,
Re: Hierarchical Query question [message #296673 is a reply to message #296663] Mon, 28 January 2008 11:09 Go to previous message
Michel Cadot
Messages: 65084
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ There are many topics on the subject
2/ There is nothing in your post regarding connect by
3/ please read and follow 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.
Use the "Preview Message" button to verify.
4/ You have an example, you can post create table and insert statements.


[Updated on: Mon, 28 January 2008 11:09]

Report message to a moderator

Previous Topic: from child to parent node!!
Next Topic: Adding 2 SUM Functions from two tables
Goto Forum:

Current Time: Fri Jul 21 21:50:48 CDT 2017

Total time taken to generate the page: 0.07052 seconds