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

query to combine a column

From: Tim B <nospam_at_someisp.ca>
Date: Sat, 14 Jul 2007 00:44:57 GMT
Message-ID: <d0Vli.112409$NV3.42373@pd7urf2no>


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? Received on Fri Jul 13 2007 - 19:44:57 CDT

Original text of this message

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