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 ?
Zahi Al-Jamous wrote at 09-Jul-98 15:50:39
>Lothar Armbrüster wrote:
>> begin
>> for comm_rec in comm_cur loop
>> update policynew
>> set comment=comment||comm_rec.comment||chr(10)
>> where
>> id=comm_rec.id;
>> end loop;
>> end;
>OK, this worked perfectly, but I still have a litte problem :
>Let's assume that the Comment fiel in the PolicyNew table is
>of type "Long", and the "Comment" field in the Commentary table
>are of type varchar2(X).
>When I try to concatenate, I have an error message. Is there a
>way to do it ?
As long as your comments stay within 32KB, you could try to select the
comment field into a varchar2 variable, do the concat there and finally
update the table.
If your comments are larger, you will have to do the thing in an external
program using Pro*C, OCI or whatsoever.
Hope that helps,
Lothar
--
Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Thu Jul 09 1998 - 14:43:44 CDT
![]() |
![]() |