I have a string which has list of valid places.
var locations = COLOMBO,DELHI,SINGAPORE
I want to query all the employees belonging to the location mention in the above string
I am using the following query
SELECT emp_id,emp_name
FROM EMPLOYEE
WHERE emp_location IN (locations) ;
Oracle is considering it as single string and searching for the below query string
SELECT emp_id,emp_name
FROM EMPLOYEE
WHERE emp_location IN ('COLOMBO,DELHI,SINGAPORE');
I want to know if there is any way I can pass the string and get the valid emp_id,emp_name belonging to the location mentioned in the string.