From d3d3b95f343ce9948fd3c306cf294e87c1c94b94 Mon Sep 17 00:00:00 2001 From: yuusuke_kanamura Date: Thu, 11 Jul 2024 14:56:06 +0900 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=A8=E8=A7=92=E3=82=B9=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=82=92=E5=8D=8A=E8=A7=92=E3=82=B9=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- s3/data/hcp_web/settings/hcp_web_accsess_log_ex.sql | 8 ++++---- s3/data/hcp_web/settings/hcp_web_medpass_user_mst_ex.sql | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/s3/data/hcp_web/settings/hcp_web_accsess_log_ex.sql b/s3/data/hcp_web/settings/hcp_web_accsess_log_ex.sql index d1f59b83..ba682ead 100644 --- a/s3/data/hcp_web/settings/hcp_web_accsess_log_ex.sql +++ b/s3/data/hcp_web/settings/hcp_web_accsess_log_ex.sql @@ -1,11 +1,11 @@ /* date_time(日付型)がNULLのレコードを抽出し、date_time(文字型) を日付型に変換してセットする。 */ /* date_time(文字型) はUTCの日付を取得するため、date_time(日付型)はMeDaCAのポリシーに合わせてJSTに変換する */ UPDATE src06.hcp_web_access_log SET -date_time = STR_TO_DATE(date_time_org, '%Y-%m-%d %H:%i:%s') + INTERVAL 9 HOUR -WHERE date_time_org IS NOT NULL and date_time IS NULL and ins_date >= (now() - INTERVAL 1 YEAR); +date_time = STR_TO_DATE(date_time_org, '%Y-%m-%d %H:%i:%s') + INTERVAL 9 HOUR +WHERE date_time_org IS NOT NULL and date_time IS NULL and ins_date >= (now() - INTERVAL 1 YEAR); /* post_evar29(日付型)がNULLのレコードを抽出し、post_evar29(文字型)を日付型に変換してセットする。 */ /* post_evar29(文字型)はUTCの日付を取得するため、post_evar29(日付型)はMeDaCAのポリシーに合わせてJSTに変換する */ UPDATE src06.hcp_web_access_log SET -post_evar29 = STR_TO_DATE(post_evar29_org, '%Y-%m-%dT%H:%i:%s') + INTERVAL 9 HOUR -WHERE post_evar29_org IS NOT NULL and post_evar29 IS NULL and ins_date >= (now() - INTERVAL 1 YEAR); \ No newline at end of file +post_evar29 = STR_TO_DATE(post_evar29_org, '%Y-%m-%dT%H:%i:%s') + INTERVAL 9 HOUR +WHERE post_evar29_org IS NOT NULL and post_evar29 IS NULL and ins_date >= (now() - INTERVAL 1 YEAR); \ No newline at end of file diff --git a/s3/data/hcp_web/settings/hcp_web_medpass_user_mst_ex.sql b/s3/data/hcp_web/settings/hcp_web_medpass_user_mst_ex.sql index 7042aa2d..6b002b68 100644 --- a/s3/data/hcp_web/settings/hcp_web_medpass_user_mst_ex.sql +++ b/s3/data/hcp_web/settings/hcp_web_medpass_user_mst_ex.sql @@ -1,14 +1,14 @@ /* 生年月日(日付型)がNULLのレコードを抽出し、生年月日(文字型) を日付型に変換してセットする。 */ UPDATE src06.hcp_web_medpass_user_mst SET BirthDate = STR_TO_DATE(BirthDate_org, '%Y-%m-%d') -WHERE BirthDate_org IS NOT NULL and BirthDate IS NULL; +WHERE BirthDate_org IS NOT NULL and BirthDate IS NULL; /* 登録日時(日付型) がNULLのレコードを抽出し、登録日時(文字型)を日付型に変換してセットする。 */ UPDATE src06.hcp_web_medpass_user_mst SET CreateDate = STR_TO_DATE(CreateDate_org, '%Y-%m-%dT%H:%i:%s') -WHERE CreateDate_org IS NOT NULL and CreateDate IS NULL; +WHERE CreateDate_org IS NOT NULL and CreateDate IS NULL; /* 最終更新日時(日付型) がNULLのレコードを抽出し、最終更新日時(文字型)を日付型に変換してセットする。 */ UPDATE src06.hcp_web_medpass_user_mst SET LastUpdate = STR_TO_DATE(LastUpdate_org, '%Y-%m-%dT%H:%i:%s') -WHERE LastUpdate_org IS NOT NULL and LastUpdate IS NULL; +WHERE LastUpdate_org IS NOT NULL and LastUpdate IS NULL;