Home » SQL & PL/SQL » SQL & PL/SQL » wrap error in oracle 9i not in 10g
wrap error in oracle 9i not in 10g [message #248791] Mon, 02 July 2007 00:43 Go to next message
jpalam
Messages: 1
Registered: July 2007
Location: india
Junior Member
I am using 9i2 database.
and I created below tables
create table Table1(key1 varchar2(10), num1 integer);
create table Table2(key1 varchar2(10), num1 integer); -- dummy for the above table

create or replace procedure Test is
TYPE Type1 IS TABLE OF Table1%ROWTYPE INDEX BY PLS_INTEGER;
type1_def Type1;
begin
type1_def(1).key1 := 'Jai';
type1_def(1).num1 := 1;
type1_def(2).key1 := 'Sri';
type1_def(2).num1 := 2;

if type1_def.EXISTS(1) then
FORALL i in 1..type1_def.COUNT
insert into table2 values type1_def(i);
end if;

end Test;

This will compile properly
But if we wrap the code we are getting the below error
PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
and PLS-00518: This INSERT statement requires VALUES clause containing a parenthesised list of values

Please let me know what could be teh wrong and alternative solution.

Thanks in advance.
Jaipal.
Re: wrap error in oracle 9i not in 10g [message #248808 is a reply to message #248791] Mon, 02 July 2007 01:50 Go to previous message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
wrap with option:
edebug=wrap_new_sql

xxx> wrap iname=t.sql
PL/SQL Wrapper: Release 9.2.0.6.0- 64bit Production on Mon Jul 02 08:48:50 2007
Copyright (c) Oracle Corporation 1993, 2001.  All Rights Reserved.
Processing t.sql to t.plb

xxx> sql
SQL*Plus: Release 9.2.0.6.0 - Production on Mon Jul 2 08:49:05 2007
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and OLAP options
JServer Release 9.2.0.6.0 - Production
SQL> @t.plb
Warning: Procedure created with compilation errors.
SQL> sho err
Errors for PROCEDURE TEST:
LINE/COL
---------------------------------------------------------------------------------
ERROR
------------------------------------------------------------------------------------------------------------------------
12/1
PL/SQL: SQL Statement ignored
12/1
PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
12/27
PLS-00518: This INSERT statement requires VALUES clause containing a parenthesised list of values
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and OLAP options
JServer Release 9.2.0.6.0 - Production

xxx> wrap iname=t.sql edebug=wrap_new_sql
PL/SQL Wrapper: Release 9.2.0.6.0- 64bit Production on Mon Jul 02 08:49:48 2007
Copyright (c) Oracle Corporation 1993, 2001.  All Rights Reserved.
Processing t.sql to t.plb

xxx> sql
SQL*Plus: Release 9.2.0.6.0 - Production on Mon Jul 2 08:49:51 2007
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and OLAP options
JServer Release 9.2.0.6.0 - Production
SQL> @t.plb
Procedure created.

Regards
Michel

[Updated on: Mon, 02 July 2007 01:55]

Report message to a moderator

Previous Topic: function
Next Topic: Split string problem
Goto Forum:
  


Current Time: Wed Dec 07 14:26:17 CST 2016

Total time taken to generate the page: 0.09752 seconds