Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,347 Comments

Discussions

Create array in PL/SQL to store value form database

I want to create array that store more than one value form one column in table. I use code below

declare
type arr is table of list.price%type index by pls_integer;
prices arr;

begin
for i in 1 .. 10 loop
select price into prices form list
where doctore_id = :list.doctore_id;
end loop;
end;

that the list is name of table and name of the data block and price is name of column

but I get the error: Error 487 at line 2, column 23 invalid reference to variable 'list'

  • I use database oracle and form 10g
  • I check the spilling of table name and column and make sure that I connect to database


Best Answer

Answers