I want to return multiple value in the THEN clause of CASE statement.
SELECT c.company_code, c.com_inactive_flag, e.emp_no
FROM company c, employees e
WHERE c.com_code = e.com_code
AND e.emp_status in (
WHEN 'N' THEN 'A'
WHEN 'Y' THEN 'B,C'
If the flag is N all those employees will be retrieved whoe has status A otherwise all those who have B and C flag should be retrieved.
But because I have 'B,C' so it will not return anything. Is there anyway I can put 'B,C' etc. instead of just one value like 'B'.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!