|
|
@ -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 (
|
|
|
|