1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /* Formatted on 2014/11/26 오후 7:31:59 (QP5 v5.256.13226.35510) */ WITH M AS (SELECT 1 AS seq, 'A' AS val FROM DUAL UNION ALL SELECT 2 AS seq, 'B' AS val FROM DUAL UNION ALL SELECT 3 AS seq, 'C' AS val FROM DUAL UNION ALL SELECT 4 AS seq, 'E' AS val FROM DUAL UNION ALL SELECT 5 AS seq, 'E' AS val FROM DUAL) SELECT seq, val FROM M UNION ALL SELECT ROWNUM + (SELECT COUNT (*) FROM M) AS seq, DECODE (ROWNUM, 1, '-이하여백-', NULL) FROM (SELECT '' val FROM DUAL WHERE 0 < MOD ( (CASE WHEN (SELECT COUNT (*) FROM M) = 0 THEN 29 ELSE (SELECT COUNT (*) FROM M) END), 30) -- 30으로 딱 떨어질때를 위한 제동장치 ) S CONNECT BY LEVEL <= 30 - MOD ( (CASE WHEN (SELECT COUNT (*) FROM M) = 0 THEN 29 ELSE (SELECT COUNT (*) FROM M) END), 30) | cs |