IFNULL -> NVL, 추가: now, today 오라클 버젼

master
mjkhan21 11 months ago
parent 41d1f6207e
commit 7425044669

@ -9,7 +9,7 @@
<insert id="insertReceptionResult" parameterType="cokr.xit.interfaces.epost.ReceptionResult">/* 전자우편 신청 수신 결과 등록(emailResultMapper.insertReceptionResult) */
<selectKey resultType="string" keyProperty="rcptnRsltId" order="BEFORE">
SELECT IFNULL(MAX(RCPTN_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
SELECT NVL(MAX(RCPTN_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_RCPTN_RSLT A, (<include refid="utility.selectToday" />) B
WHERE RCPTN_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_RCPTN_RSLT (
@ -53,7 +53,7 @@ SELECT #{rcptnRsltId} <!-- 수신 결과 ID -->
<insert id="insertRegistrationResult" parameterType="cokr.xit.interfaces.epost.RegistrationResult">/* 전자우편 신청 접수 결과 등록(emailResultMapper.insertRegistrationResult) */
<selectKey resultType="string" keyProperty="rcptRsltId" order="BEFORE">
SELECT IFNULL(MAX(RCPT_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
SELECT NVL(MAX(RCPT_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_RCPT_RSLT A, (<include refid="utility.selectToday" />) B
WHERE RCPT_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_RCPT_RSLT (
@ -129,7 +129,7 @@ SELECT #{conKey} <!-- 외부연계식별키 -->
<insert id="insertDeliveryResult" parameterType="cokr.xit.interfaces.epost.DeliveryResult">/* 전자우편 배달 결과 등록(emailResultMapper.insertDeliveryResult) */
<selectKey resultType="string" keyProperty="dlvrRsltId" order="BEFORE">
SELECT IFNULL(MAX(DLVR_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
SELECT NVL(MAX(DLVR_RSLT_ID) + 1, CONCAT(TODAY, '0000001')) NEW_ID
FROM TB_EPOST_DLVR_RSLT A, (<include refid="utility.selectToday" />) B
WHERE DLVR_RSLT_ID LIKE CONCAT(TODAY, '%')</selectKey>
INSERT INTO TB_EPOST_DLVR_RSLT (

Loading…
Cancel
Save