/* Formatted on 12/24/2010 2:02:41 PM (QP5 v5.163.1008.3004) */
SELECT TO_CHAR (SUBSTR (c,
INSTR (c,
',',
1,
LEVEL)
+ 1,
INSTR (c,
',',
1,
LEVEL + 1)
- INSTR (c,
',',
1,
LEVEL)
- 1)) dayofweek
FROM (SELECT ',' || 'MON,TUE,WED' || ',' c FROM DUAL)
CONNECT BY LEVEL < LENGTH (c) - LENGTH (REPLACE (c, ','))