I'm trying to create a function to pass a list separated with commas as a parameter to the IN clause.
CREATE OR REPLACE EDITIONABLE FUNCTION "GET_EMPLOYEES_COUNT"(DEPT_STRING VARCHAR2) RETURN VARCHAR2 AS
count_emp VARCHAR2(10);
BEGIN
select count(*) from employees where deptname IN (DEPT_STRING);
RETURN count_emp;
END GET_EMPLOYEES_COUNT;
However, I am getting null when trying to call the following:
SELECT GET_EMPLOYEES_COUNT('''AGRICULTURE'',''IT''') FROM DUAL;