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

Home -> Community -> Usenet -> c.d.o.tools -> Re: newbie: copy records from one table to another

Re: newbie: copy records from one table to another

From: Yaroslav Perventsev <p_yaroslav_at_cnt.ru>
Date: Thu, 26 Jul 2001 13:12:30 +0400
Message-ID: <9jomq1$4m5$1@news247.cnt.ru>

Hello!

Reiner <slugu_at_yahoo.com> ñîîáùèë â íîâîñòÿõ ñëåäóþùåå:922e593d.0107252103.5ef36c23_at_posting.google.com... > "andrew_webby at hotmail" <spam_at_no.thanks.com> wrote in message  news:<995969099.8893.0.nnrp-07.c30bdde2_at_news.demon.co.uk>...
> > Also, no need to commit on every record/loop-step - why not commit every
> > 100, or 1000 records in your loop? Just set up a simple counter to
 track...
> >
> > "Yaroslav Perventsev" <p_yaroslav_at_cnt.ru> wrote in message
> > news:9jj776$k9m$1_at_news247.cnt.ru...
> > > Hello!

 <snip>

> > > > I then tried writng a PL/SQL script but am having problems. How do I
> > > > insert record-by-record. I also just realized I need a commit after
> > > > each loop step.
> > <snip>
>
> Thanks guys for your help. I still have problems when I try to run the
> SQL file from Oracle's SQL Plus. It starts like:
>
> DECLARE
>
> CURSOR c1 IS
>     select * from TRANSACTION where TRANSACTION_DATE<'01-feb-00 00:00'
> ORDER BY transaction_date;
>
> BEGIN
> OPEN c1;
>
> FOR txn IN c1 LOOP
> insert into TRANSACTIONBACKUP values (
> txn.CLIENT_ID,

and all? more code..?

>
> And when I run it I get the following errors:
>
> DECLARE
> *
> ERROR at line 1:
> ORA-06550: line 8, column 8:
> PLS-00302: component 'CLIENT_ID' must be declared

AFAIK...It's mean - table TRANSACTION havn't field CLIENT_ID.

Yaroslav.

> ORA-06550: line 7, column 3:
> PL/SQL: SQL Statement ignored
>
> Obviously there is something wrong in my declaration but I don't know
> what.
Received on Thu Jul 26 2001 - 04:12:30 CDT

Original text of this message

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