From 55d1d72766ef3ad2fdcefb62e59f24ee4a814d07 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 13 Dec 2023 16:07:40 +0900 Subject: [PATCH] =?UTF-8?q?IFNULL=20->=20NVL,=20=EC=B6=94=EA=B0=80:=20now,?= =?UTF-8?q?=20today=20=EC=98=A4=EB=9D=BC=ED=81=B4=20=EB=B2=84=EC=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/utility.xml | 19 +++++++++++++------ .../sql/mapper/lvis/vehicleInfo-mapper.xml | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/main/resources/sql/mapper/base/utility.xml b/src/main/resources/sql/mapper/base/utility.xml index 5187fae..c927282 100644 --- a/src/main/resources/sql/mapper/base/utility.xml +++ b/src/main/resources/sql/mapper/base/utility.xml @@ -20,16 +20,23 @@ SELECT FOUND_ROWS() TOT_CNT -DATE_FORMAT(CURRENT_TIMESTAMP(), '%Y%m%d%H%i%s') - -SELECTNOW + +DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s') DATE_FORMAT(CURRENT_DATE, '%Y%m%d') -SELECTTODAY + + +SELECTNOW FROM DUAL + +SELECTTODAY FROM DUAL -IFNULL(#{thisDay},) +NVL(#{thisDay},) -SELECTTHIS_DAY +SELECTTHIS_DAY FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml b/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml index 9be4f6a..70c263b 100644 --- a/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml +++ b/src/main/resources/sql/mapper/lvis/vehicleInfo-mapper.xml @@ -208,7 +208,7 @@ SELECT CASE WHEN LENGTH(STDG_LI_NM) > 0 THEN SELECT CONCAT( - , LPAD(IFNULL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') + , LPAD(NVL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') ) NEW_ID FROM TB_CAR_BSC_MTTR TCBM WHERE BSC_MTTR_ID LIKE CONCAT(, '%') @@ -618,7 +618,7 @@ SELECT PRYE SELECT CONCAT( - , LPAD(IFNULL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') + , LPAD(NVL(SUBSTRING(MAX(BSC_MTTR_ID), 9) + 1, 1), 22, '0') ) NEW_ID FROM TB_CAR_BSC_MTTR TCBM WHERE BSC_MTTR_ID LIKE CONCAT(, '%')