Search

'2018/06'에 해당되는 글 2건

  1. 2018.06.12 [Oracle] 다중 LIKE(REGEXP_LIKE)
  2. 2018.06.04 [ORACLE]COUNT DECODE

[Oracle] 다중 LIKE(REGEXP_LIKE)

Database 2018.06.12 08:13 Posted by 애플자라
EDIT EM_MMT_LOG_201806
WHERE TRAN_ETC2='MASS'
AND REGEXP_LIKE(TRAN_ETC1, '2018060800001|2018061100001|2018061100002')
--AND TRAN_ETC1 (LIKE '%2018060800001%' or LIKE '%2018061100001%' or LIKE '%2018061100002%')

 

[ORACLE]COUNT DECODE

Database 2018.06.04 09:23 Posted by 애플자라

SELECT '신청: '||TOTAL||'건(전체), '||P_TYPE||'건(PC), '||M_TYPE||'건(모바일)' AS EVENT_M

FROM

(

SELECT COUNT (1) AS TOTAL,

       COUNT (DECODE (TYPE, 'P', 'P')) AS P_TYPE,

       COUNT (DECODE (TYPE, 'M', 'M')) AS M_TYPE

  FROM N_BOARD_EVENT

)