In writing a Conditional Control Case Statement in PL/SQL, I got this error. My code is below. Is there a particular way I need to do the > and < signs or did I overlook something. Any help would be great.
ORA-06550: line 11, column 6:
PLS-00103: Encountered the symbol ">" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specif
- DECLARE
- v_country_name wf_countires.country_name%TYPE := 'United States';
v_airports wf_countries.airports%TYPE;
`DECLARE
v_country_name wf_countires.country_name%TYPE := 'United States';
v_airports wf_countries.airports%TYPE;
BEGIN
SELECT airports INTO v_airports
FROM wf_countries
WHERE country_name = v_country_name;
v_country_name :=
CASE v_airports
When > 10000 THEN 'There are greater more than 10000 airports'
When < 10000 THEN 'There are between 1001 and 10000 airports'
When < 1000 THEN 'There are between 101 and 1000 airports'
When < 100 THEN 'There are 100 or fewer airports'
ELSE 'The number of airports is not available for this country'
END CASE;
END;