Hi All,
I want to update table temp_emp by passing values(employees) from a query that fetches multiple values.
Can anyone please help on how can I use LISTAGG in the where condition.
SELECT LISTAGG(ename, ',') WITHIN GROUP (ORDER BY ename) AS employees
FROM emp
where deptno = 10;
EMPLOYEES
--------------------------------------------------
CLARK,KING,MILLER
UPDATE temp_emp
set emp_status = 'new'
where empname = employees
Thanks.