Use Of Local Collection Types Is Not Allowed in SQL Statements.
(Doc ID 208763.1)
Last updated on OCTOBER 19, 2019
Applies to:
PL/SQL - Version 8.1.7.4 and laterInformation in this document applies to any platform.
***Checked for relevance on 23-Dec-2013***
Symptoms
* PLS-00642: local collection types not allowed in SQL statements
* ORA-06550: line %s, column %s:\n%s
* ORA-00932: inconsistent data types
Changes
Attempt to insert locally defined varray type as follows:
create type my_varray_type as varray(10) of number;
/
create table my_table(my_column my_varray_type);
declare
type local_varray_type is varray(10) of number;
local_varray local_varray_type := local_varray_type();
begin
local_varray.extend(10);
insert into my_table values(local_varray);
end;
/
/
create table my_table(my_column my_varray_type);
declare
type local_varray_type is varray(10) of number;
local_varray local_varray_type := local_varray_type();
begin
local_varray.extend(10);
insert into my_table values(local_varray);
end;
/
Error:
insert into my_table values(local_varray);
*
ERROR at line 7:
ORA-06550: line 7, column 31:
PLS-00642: local collection types not allowed in SQL statements
ORA-06550: line 7, column 31:
PL/SQL: ORA-00932: inconsistent datatypes
ORA-06550: line 7, column 3:
PL/SQL: SQL Statement ignored
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |