From 7a48fb2c4aad3b5bd4dea89d8593f78d956e1bd0 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 15 Feb 2024 20:37:47 +0000 Subject: [PATCH] Use "UNK" unknown person when person is null Fixes problems #16 and #18 for COMM_MEMB_LOG. --- conversion/load_data.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conversion/load_data.sql b/conversion/load_data.sql index 6fdbb79..81372c8 100644 --- a/conversion/load_data.sql +++ b/conversion/load_data.sql @@ -187,7 +187,11 @@ INSERT INTO comm_memb_log ( , chimp_id , update_description , update_rationale - , made_by + , CASE -- This solves NULL data problems; problems #18, #16 + WHEN made_by IS NULL + THEN 'UNK' + ELSE made_by + END CASE FROM community_membership_update_log -- Get a consistent id generation ORDER BY date_of_update, chimp_id, update_rationale, made_by; -- 2.34.1