pk채번 수정

main
이범준 10 months ago
parent a1433b76dc
commit 4b26a0dd5c

@ -8,7 +8,8 @@
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_MASTR_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CNTC_SNDNG_MASTR
FROM TB_CNTC_SNDNG_MASTR
WHERE UNITY_SNDNG_MASTR_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
</selectKey>
INSERT
INTO TB_CNTC_SNDNG_MASTR (
@ -52,7 +53,8 @@ INSERT
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_DETAIL_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CNTC_SNDNG_DETAIL
FROM TB_CNTC_SNDNG_DETAIL
WHERE UNITY_SNDNG_DETAIL_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
</selectKey>
INSERT
INTO TB_CNTC_SNDNG_DETAIL (

@ -8,7 +8,8 @@
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CRDN_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CRDN
FROM TB_CRDN
WHERE CRDN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
</selectKey>
INSERT INTO TB_CRDN (
CRDN_ID <!-- 단속 ID -->

@ -648,7 +648,8 @@ SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CRDN_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CRDN
FROM TB_CRDN
WHERE CRDN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
</selectKey>
INSERT
INTO TB_CRDN (

@ -34,7 +34,8 @@ SELECT SA.INDIV_ID <!-- 개별 ID -->
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0'))
AS NEW_ID
FROM TB_SA_CVLCPT_INDIV_DMND
FROM TB_SA_CVLCPT_INDIV_DMND
WHERE INDIV_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
</selectKey>
/* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */
INSERT

Loading…
Cancel
Save