This is simple PL/SQL block and I have very simple error, ORA-06550 but I can't find it, pls Help me to solve this error..........
Question: Display category wise prize of most costly item
create table menu
(
    item_id number primary key,
    name_ varchar2(20),
    prize number,
    category varchar(15)
);
create table order_
(
    o_id number primary key,
    item_id number references menu(item_id),
    table_no number,
    qty number
);
SQL> declare
  2      cursor data1 is  select max(prize) as "prize_", category
  3                       from menu
  4                       group by category;
  5
  6      cursor data2(pr number, cat varchar(15)) is
  7          select prize, name_, category
  8          from menu
  9          where prize = pr and category = cat;
 10
 11
 12      data1_cat varchar(15);
 13      data1_pri number;
 14
 15      data2_cat varchar(15);
 16      data2_pri number;
 17      data2_name varchar(15);
 18  begin
 19      open data1;
 20      open data2;
 21
 22      fetch data1 into data1_pri, data1_cat;
 23      while data1%found
 24      loop
 25          fetch data2(data1_pri, data1_cat) into data2_pri, data2_name, data2_cat;
 26          while data2%found
 27          loop
 28              dbms_output.put_line(data2_name || ' '  || data2_pri || ' '  || data2_cat);
 29              fetch data2(data1_pri, data1_cat) into data2_pri, data2_name, data2_cat;
 30          end loop;
 31
 32
 33          fetch data1 into data1_pri, data1_cat;
 34      end loop;
 35      close data2;
 36      close data1;
 37  end;
 38  /
Error is blow
ERROR at line 6:
ORA-06550: line 6, column 40:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue.
ORA-06550: line 25, column 20:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
. into bulk
ORA-06550: line 25, column 80:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( , % from
ORA-06550: line 29, column 24:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
. into bulk
ORA-06550: line 29, column 84:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( , % from
ORA-06550: line 35, column 5:
PLS-00103: Encountered the symbol "CLOSE" when expecting one of the following:
end not pragma final instantiable order overriding static
member constructor map
 
    