dbTalk Databases Forums  

SELECTing multiple rows to a single output line

comp.database.oracle comp.database.oracle


Discuss SELECTing multiple rows to a single output line in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
R. P.
 
Posts: n/a

Default SELECTing multiple rows to a single output line - 08-13-2005 , 11:08 PM






Anybody knows a way to produce output from a SELECT statement on a
single line, instead of each hit on a separate line?

Here is what I mean: let's say I have a table listing families, one per
row that includes the name of father, mother and the number of children.
Then there would be another table with one row for each child and the
rows would be linked to the first table with a foreign key scheme.

Now I would like to list each family with joining the two tables, with
the name of children listed on the same line as the parents, with --
say -- a comma separating each child's name.

I can't figure out any way to produce SELECT output serially, on a
single line. Some suggested stored procedures but my past experience
with stored procedures was that they often were "unstored" when the DBA
did some maintenance and it was just not as reliable as using dynamic
SQL statements, in this case with Java.

Thanks for any tips you might have,
Rudy


Reply With Quote
  #2  
Old   

 
Posts: n/a

Default Re: SELECTing multiple rows to a single output line - 08-16-2005 , 01:52 PM







"R. P." <r_pol12gar (AT) hotmail (DOT) com> wrote

Quote:
Anybody knows a way to produce output from a SELECT statement on a
single line, instead of each hit on a separate line?

Here is what I mean: let's say I have a table listing families, one per
row that includes the name of father, mother and the number of children.
Then there would be another table with one row for each child and the
rows would be linked to the first table with a foreign key scheme.

Now I would like to list each family with joining the two tables, with
the name of children listed on the same line as the parents, with --
say -- a comma separating each child's name.

I can't figure out any way to produce SELECT output serially, on a
single line. Some suggested stored procedures but my past experience
with stored procedures was that they often were "unstored" when the DBA
did some maintenance and it was just not as reliable as using dynamic
SQL statements, in this case with Java.
http://builder.com.com/5100-6388_14-5259821.html




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.