|
|
|
@ -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'))
|
|
|
|
|
AS NEW_ID
|
|
|
|
|
FROM TB_CNTC_SNDNG_MASTR
|
|
|
|
|
WHERE UNITY_SNDNG_MASTR_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
|
|
|
|
|
</selectKey>
|
|
|
|
|
INSERT
|
|
|
|
|
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'))
|
|
|
|
|
AS NEW_ID
|
|
|
|
|
FROM TB_CNTC_SNDNG_DETAIL
|
|
|
|
|
WHERE UNITY_SNDNG_DETAIL_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')
|
|
|
|
|
</selectKey>
|
|
|
|
|
INSERT
|
|
|
|
|
INTO TB_CNTC_SNDNG_DETAIL (
|
|
|
|
|