Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 => <> or != or ~= >= <= <> and or like like2 like4 likec as between || multiset member submultiset The symbol ", was inserted before "=" to continue. ORA-06550: line 14, column 15: PLS-00103: Encountered the symbol "=" when expecting one of the following:

. ( ) , * @ % & = - + < / > at in is mod remainder not rem => <> or != or ~= >= <= <> and or like like2 like4 likec as between || multiset member submultiset The symbol ", was inserted before "=" to continue. ORA-06550: line 19, column 15: PLS-00103: Encountered the symbol "=" when expecting one of the following:

. ( ) , * @ % & = - + < / > at in is mod remainder not rem => <> or != or ~= >= <= <> and or like like2 like4 likec as between || multiset member submultiset The symbol ", was inserted before "=" to continue. ORA-06550: line 24, column 15: PLS-00103: Encountered the symbol "=" when expecting one of the following:

. ( ) , * @ % & = - + < / > at in is mod remainder not rem => <> or != or ~= >= <= <> and or like like2 like4 likec as between || multiset member submultiset The symbol ", was inserted before "=" to continue. 06550. 00000 - "line %s, column %s: %s" *Cause: Usually a PL/SQL compilation error. *Action:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions