From 21e5fdd3bca8e4df98551a9f272542491440c22f Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 13 Dec 2023 16:07:14 +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 | 20 +++++++++++++------ .../sql/mapper/lvis/vehicleInfo-mapper.xml | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/main/resources/sql/mapper/base/utility.xml b/src/main/resources/sql/mapper/base/utility.xml index 5c14cfd..c927282 100644 --- a/src/main/resources/sql/mapper/base/utility.xml +++ b/src/main/resources/sql/mapper/base/utility.xml @@ -20,15 +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 + +NVL(#{thisDay},) -IFNULL(#{thisDay},) +SELECTTHIS_DAY FROM DUAL -SELECTTHIS_DAY \ 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 5ccdc5d..6a59534 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(, '%')