fix: ②-2の条件ミス修正
This commit is contained in:
parent
7b5821e384
commit
73cd6a96e2
@ -17,7 +17,7 @@ BEGIN
|
||||
EXECUTE make_history_tmp_create_stmt;
|
||||
|
||||
-- ②-2 「②-1」で取得した全件に更新処理を行う
|
||||
SET @update_end_datetime = 'UPDATE @@target_table tt LEFT JOIN make_history_tmp mht ON tt.id = mht.id AND tt.start_datetime = mht.min_start_datetime SET start_datetime = mht.max_start_datetime - INTERVAL 1 SECOND WHERE mht.id IS NULL';
|
||||
SET @update_end_datetime = 'UPDATE @@target_table tt LEFT JOIN make_history_tmp mht ON tt.id = mht.id AND tt.start_datetime = mht.min_start_datetime SET start_datetime = mht.max_start_datetime - INTERVAL 1 SECOND WHERE mht.id IS NOT NULL';
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "@@target_table", target_table);
|
||||
SET @update_end_datetime = REPLACE(@update_end_datetime, "@@target_column", target_column);
|
||||
PREPARE update_end_datetime_stmt from @update_end_datetime;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user