Hi,
Its urgent,
I have to initialize a collection variable and the initial values are to be got from a query.
See the below code
declare
type acd is table of varchar2(50);
t1 acd:=acd('asset1','asset2','asset3','asset4','asset5');
i number;
k number;
j acd:=acd('asset1','asset2','asset3');
begin
for i in 1 .. 5 loop
for k in 1..3 loop
if j(k)=t1(i) then
dbmsoutput.putline(j(k));
end if;
end loop;
end loop;
end;
I have a variable acd of type table.
I have two variables t1, j of type acd.
The initial values of t1 are known.
The initial values of j need to be got dynamically from a select query.
The following error comes up when we run the above query with a select statement
PLS-00642: local collection types not allowed in SQL statements
Is there any solution to this problem.?
TIA
Udaya
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).