|
|
@ -8,7 +8,8 @@
|
|
|
|
SELECT
|
|
|
|
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 (
|
|
|
@ -52,7 +53,8 @@ INSERT
|
|
|
|
SELECT
|
|
|
|
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 (
|
|
|
|