Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: [SQL] How to merge two tables into one ?
Create a pl/sql script to loop through the commentary table and append the
comments to each other. You'll need to watch that the newly created
variable doesn't exceed the defined column length of the policynew.comment
column.
--
Terry Dykstra [TeamPS]
Canadian Forest Oil Ltd.
Zahi Al-Jamous wrote in message <35A36D04.EAB146DB_at_crv.pechiney.fr>...
>Hi all,
>
>i have two tables structured like this :
>
>Table policy
> Id
> Number
> Customer
> Adress
>Table Commentary
> Id (foreign key references policy.Id)
> LineNumber
> Comment
>
>I want to have one table :
>table PolicyNew
> Id
> Number
> Customer
> Adress
> Comment
>
>Where "Comment" is the concatenation of all the "Comment" fields in
>table Commentary where Policy.Id = Commentary.Id
>
>Can someone help me writing this script ?
>
>TIA,
>
>Zahi
>
>--
>Zahi Al-Jamous e-mail: aljamous_at_crv.pechiney.fr
>Groupe GIL
>Pechiney-CRV
>BP 27 tel (work): +33.(0)4.76.57.82.45
>F-38340 Voreppe tel (cell): +33.(0)6.14.55.16.88
Received on Wed Jul 08 1998 - 14:32:41 CDT
![]() |
![]() |