Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Combine records
Hi,
I am running a join query which returns several records with the same id (c_id). The query and the selected records are as the following:
select c_id, product, country, region from mytable1 Results: c_id product country region 1 toy1 Turkey Middle East 1 toy1 Turkey Europe .................. As you can see, a country can belong to multiple regions. If therecords have the same values for all the columns except the region, like the above,
I would like to combine the records into one record, as the following:
c_id product country region 1 toy1 Turkey Middle East -Europe
Is there a simple way to do it or is PL/SQL needed for the job?
I don't have control over the table design BTW.
Thanks in advance.
Nick Received on Thu Dec 11 2003 - 00:20:54 CST
![]() |
![]() |