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: query to combine a column

Re: query to combine a column

From: Tim B <nospam_at_someisp.ca>
Date: Tue, 17 Jul 2007 00:47:28 GMT
Message-ID: <AkUmi.124342$1i1.22376@pd7urf3no>

"William Robertson" <williamr2019_at_googlemail.com> wrote in message news:1184564949.710065.230780_at_m3g2000hsh.googlegroups.com...
> On Jul 14, 1:44 am, "Tim B" <nos..._at_someisp.ca> wrote:
> > I have a query that returns something like this, which is in a pl/sql
> > function:
> >
> > id description col3
> >
> > ---------------------------------
> > 123 dingo stuff123
> >
> > 357 anteater stuff357
> >
> > 357 aardvark stuff357
> >
> > 357 wombat stuff357
> >
> > 677 kangaroo stuff677
> >
> > What I want is a query that will transform the results of the above
query
> > like this:
> >
> > id description col3
> >
> > -------------------------------------------------------------
> > 123 dingo stuff123
> >
> > 357 anteater$$aardvark$$wombat stuff357
> >
> > 677 kangaroo stuff677
> >
> > I want to remove the duplicate case_nums and combine their descriptions.
The
> > '$$' would be for use as a marker for splitting up the string inJava.
> >
> > Any suggestions on how to do this, if it can be done?
> >
> > Alternatively - This query is used to populate a cursor, which is
returned
> > by the function.
> >
> > Is there a way to make the transformation in pl/sql and still return a
> > cursor from the function?
>
> Some further suggestions here:
> http://www.williamrobertson.net/documents/one_row.html

Thanks, there's some useful stuff there. Received on Mon Jul 16 2007 - 19:47:28 CDT

Original text of this message

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