키 채번 수정

main
이범준 6 months ago
parent 3f6f350e8c
commit fa8ab2c595

@ -22,12 +22,12 @@ SELECT
<sql id="keyBySggAndYear">
SELECT
CONCAT(
#{sggCd}
${sggCd}
, <include refid="utility.currentYear" />
, LPAD(CAST(IFNULL(MAX(SUBSTRING(${TABLE_KEY}, 9+1)) + 1, 1) AS INT), ${pad}-9, '0')
) AS NEW_ID
FROM ${TABLE_NAME}
WHERE ${TABLE_KEY} LIKE CONCAT(#{sggCd}, <include refid="utility.currentYear" />, '%')
WHERE ${TABLE_KEY} LIKE CONCAT(${sggCd}, <include refid="utility.currentYear" />, '%')
</sql>
</mapper>
Loading…
Cancel
Save