Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do we select multiple return rows on a single line?

Re: How do we select multiple return rows on a single line?

From: Robin Quasebarth <robinq_at_data-pointnospam.com>
Date: Fri, 04 Dec 1998 07:27:10 -0800
Message-ID: <3667FF4D.63D98168@data-pointnospam.com>


You can do it with Oracle Reports with the first query group repeating DOWN and the second query group within and on top of the first repeating ACROSS.

ed_at_kideys.com wrote:

> 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 Fri Dec 04 1998 - 09:27:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US