Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: copying table data with "long" rows

Re: copying table data with "long" rows

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Mon, 6 May 2002 20:09:40 +0100
Message-ID: <3cd6d4f6$0$8511$cc9e4d1f@news.dial.pipex.com>


I agree with Vladimir for example
SQL> create table tab_a(id number,lng long);

Table created.

SQL> create table tab_c(id number,lngtext clob);

Table created.

SQL> insert into tab_a values(1,'alkjjasdjlkdasjljkjldsa');

1 row created.

SQL> commit;

Commit complete.

SQL> insert into tab_c select id,to_lob(lng) from tab_a;

1 row created.

SQL> commit;

Commit complete.

easy huh.

"Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> wrote in message news:ab608o$sd3$1_at_babylon.agtel.net...
> for b in (select * from tab_b where ...) loop
> insert into tab_a (x, y, z) values ( b.x, b.y, b.z );
> end loop;
> commit;
>
> I would recommend changing LONGs to LOBs though - LOBs are
> much more flexible and efficient than LONGs.
>
> --
> Vladimir Zakharychev (bob_at_dpsp-yes.com)
http://www.dpsp-yes.com
> Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet
applications.
> All opinions are mine and do not necessarily go in line with those of my
employer.
>
>
> "Stephan Bressler" <stephan.bressler_at_pdb.sbs.de> wrote in message
> news:ab5ekf$oj7$1_at_news.mch.sbs.de...
> > Hi,
> >
> > I need to do something like
> > insert into tab_a select * from tab_b where ...
> >
> > Unfortunately, both tables contain a column of type 'long'.
> >
> > Is there a short workaround, e.g. PL/SQL?
> >
> > TIA
> > Stephan
> >
> >
>
Received on Mon May 06 2002 - 14:09:40 CDT

Original text of this message

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