Re: Problem with FETCH/INTO
From: Dan Blum <tool_at_panix.com>
Date: Tue, 5 Aug 2008 00:37:50 +0000 (UTC)
Message-ID: <g787cu$bfu$1@reader1.panix.com>
Date: Tue, 5 Aug 2008 00:37:50 +0000 (UTC)
Message-ID: <g787cu$bfu$1@reader1.panix.com>
Kramer314 <johnlkramer_at_gmail.com> wrote:
> Hi guys. ANother quick question. I have the following sql file:
> DECLARE
> CURSOR cursor1 is SELECT * FROM tblName1 WHERE tblName1.ald="id";
> BEGIN
> FETCH cursor1
> BULK COLLECT INTO tblName2 LIMIT 10;
> END;
> When I try to run the script, I get the following error:
> ORA-06550: line 7, column :
> PLS-00403: expression 'TBLNAME2' cannot be used as an INTO-target of a
> SELECT/FETCH statement
You can't fetch into a table. What you want there is a record collection. Unless of course you really want to copy records from one table to another, in which case you want to use INSERT INTO tblName2 SELECT FROM tblName1 ...
-- _______________________________________________________________________ Dan Blum tool_at_panix.com "I wouldn't have believed it myself if I hadn't just made it up."Received on Mon Aug 04 2008 - 19:37:50 CDT