pk채번 수정

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

@ -9,6 +9,7 @@ SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_MASTR_ID,5)) + 1, 1) AS INT), 16, '0')) 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 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> </selectKey>
INSERT INSERT
INTO TB_CNTC_SNDNG_MASTR ( INTO TB_CNTC_SNDNG_MASTR (
@ -53,6 +54,7 @@ SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_DETAIL_ID,5)) + 1, 1) AS INT), 16, '0')) 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 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> </selectKey>
INSERT INSERT
INTO TB_CNTC_SNDNG_DETAIL ( INTO TB_CNTC_SNDNG_DETAIL (

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

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

@ -35,6 +35,7 @@ SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0')) CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0'))
AS NEW_ID 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> </selectKey>
/* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */ /* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */
INSERT INSERT

Loading…
Cancel
Save