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: Reiner <slugu_at_yahoo.com>
Date: 25 Jul 2001 22:03:17 -0700
Message-ID: <922e593d.0107252103.5ef36c23@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 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
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 - 00:03:17 CDT

Original text of this message

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