Well first of all, in PL/SQL you would use elsif not elseif
(drop the e). Also, your last else looks like it should be an
elsif, and your query shouldn't be nested within your IF. Also,
v_category = 'fitness' or 'family life' or 'children' or 'business'
is improper syntax. You could use either an IN statement, or
individually compare each parameter to v_category with an or, such
as in v_category = 'fitness' or v_category = 'family life' or
v_category = 'children' or v_category = 'business' , etc
elsif v_category = 'literature' or v_category = 'self help'
then,,,
....
elsif v_category IN ('fitness', 'family life', 'children',
'business')
then v_retailincrease := 5;
end if;
select isbn, title, retail, retail*v_retailincrease
into v_isbn, v_title, v_retail, v_newretail
from books
where isbn = v_isbn;
Also, change this: dbms_output.put_line (v_title ' '
v_newretail);
to this: dbms_output.put_line (v_title ||' ' ||v_newretail);
in order to concatenate the two variables..
Last word. I hope you realize that you will throw an
exception if your query either returns more than one row, or no
rows at all. This is something that you need to get used to with
PL/SQL that you don't have to face when using straight SQL. You
will learn that you will need to handle your exceptions, and also
how to start using cursors rather SELECT INTO statements when
possible.
Phil