From 37f5981de88f3c227f55ac8841cc7a373f5f0fa5 Mon Sep 17 00:00:00 2001 From: poveyd <32199157+poveyd@users.noreply.github.com> Date: Mon, 4 May 2020 15:17:45 +0100 Subject: [PATCH] Update cycle_notification_history_in_batches.sql --- .../cycle_notification_history_in_batches.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/database_maintenance/cycle_notification_history_in_batches.sql b/database_maintenance/cycle_notification_history_in_batches.sql index 82297434f..4dbd3fb9b 100644 --- a/database_maintenance/cycle_notification_history_in_batches.sql +++ b/database_maintenance/cycle_notification_history_in_batches.sql @@ -2,9 +2,7 @@ CREATE TABLE notification_history_pivot AS SELECT * from notification_history WHERE 1=2; -SELECT id -INTO nh_temp -FROM notification_history; +CREATE TEMPORARY TABLE nh_temp AS SELECT id FROM notification_history; SELECT COUNT(*) AS 'Total number of rows in nh' FROM nh_temp;