How to test if a string is inside a list of predinfined list of string in oracle pl/sql
- by drupalspring
I define a list a string which contains different country codes ( for example , USA ,CHINA ,HK ,JPN) How can I check that if a input variable equal to one of the country of the country list in pl/sql . I use the following code to test it but fail, how can I revise it?
declare
country_list CONSTANT VARCHAR2(200) := USA,CHINA,HK,JPN;
input VARCHAR2(200);
begin
input := 'JPN';
IF input IN (country_list)
DBMS_OUTPUT.PUT_LINE('It is Inside');
else
DBMS_OUTPUT.PUT_LINE('It is not Inside');
END IF;
end;