Question: Using Oracle 12c, SQL Developer and getting PLS-00103 error. DECLARE number_of_items number(3); membership number(1); BEGIN number_of_items := 9; membership := 0; -- 1 = yes,
Using Oracle 12c, SQL Developer and getting PLS-00103 error.
DECLARE number_of_items number(3); membership number(1);
BEGIN number_of_items := 9; membership := 0; -- 1 = yes, 0 = no if number_of_items > 10 then if(membership := 0) then dbms_output.put_line('cost = $12'); else dbms_output.put_line('cost = $9'); end if;
elsif number_of_items >= 7 then if(membership := 0) then dbms_output.put_line('cost = $10'); else dbms_output.put_line('cost = $7'); end if;
elsif number_of_items >= 4 then if(membership := 0) then dmbs_output.put_line('cost = $7.50'); else dbms_output.put_line('cost = $5'); end if;
else if(membership := 0) then dbms_output.put_line('cost = $5'); else dbms_output.put_line('cost = $3'); end if;
end if;
END; Error report - ORA-06550: line 9, column 15: PLS-00103: Encountered the symbol "=" when expecting one of the following:
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
. ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
