I'm not sure how best to go about this. Is it possible to decode each value in a colon delimited list? Example:
emp
---
1:2:3:4
decode(emp, ('1','2','3','4'), ('a','b','c','d')) emp
result:
emp
------
a:b:c:d
But obviously this does not work. What would be the best course of action to achieve this?
CodePudding user response:
Try with
SELECT LISTAGG(ENAME, ', ')
WITHIN GROUP (ORDER BY hiredate, ENAME) "Emp_list",
MIN(hiredate) "Earliest" FROM emp WHERE deptno = 30;
You can pick any delimiter.