ORA-06530 when using PL cursor loop

From: aquatone2 <aquatone_at_spamoff.dial.pipex.com>
Date: Thu, 19 Aug 1999 00:41:13 +0100
Message-ID: <7pfgk3$78u$1_at_lure.pipex.net>



I'm trying to copy a table from one schema to another. As the table has a LONG column, you can't do it in straight SQL, so I used a bit of PL to do the job. This works fine on Oracle 7.3, but is failing on Oracle 8:

SQL> declare
  2 cursor oldTable is
  3 select * from V1.RPRTS;
  4 begin
  5 for rep in oldTable loop
  6 insert into V2.RPRTS
  7 ( OWNER, RPTNAME, RPTID,
  8 SRCDATA, CTRLLEN, RPTLEN )
  9 values (rep.OWNER, rep.RPTNAME, rep.RPTID,  10 rep.SRCDATA, rep.CTRLLEN, rep.RPTLEN);  11 end loop;
 12 end;
 13 /
declare
*
ERROR at line 1:
ORA-06530: Reference to uninitialized composite ORA-06512: at line 6

I have looked up the message in the Oracle 8 docs, but can't work out what it means in the context of what I'm doing. Neither can I see why this should fail. Any ideas?

--

regards,

John

 "Why, sometimes I've fixed as many as six
  impossible bugs before breakfast."
Received on Thu Aug 19 1999 - 01:41:13 CEST

Original text of this message