Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How do we select multiple return rows on a single line?
I would like to assemble a select query that lists all of the returned data
in a single line - suppressing the carriage returns between them. For use
essentially as a "field" in a larger parent query.
For example, if I have a table "parent (name, age, sex)", and a seperate table
"child (name, parent name)".
I do not know how many children a given parent has (zero to N).
I'd like the report output to look something like:
Parent Name Age Sex Children ----------- --- --- -------- Fred 32 M Sue, Betsy Karen 40 F Tom Bob 15 M Mark 29 M Abe, Bill, Cindy
But I do not know how to write the query such that all the children can be returned in a single "field" of the parent query.
All of my attempts at this thus far has resulted in one child per row returned, with the parent data on each line - which really isn't what I'm looking for at all.
Ed Kideys
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Dec 03 1998 - 15:29:38 CST
![]() |
![]() |