From 8a528cc7d1a9fb9bf5bccc4752c4cddf70e6b205 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sat, 20 Jan 2024 21:04:35 +0000 Subject: [PATCH] Convert BIOGRAPHY_LOG --- conversion/load_data.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/conversion/load_data.sql b/conversion/load_data.sql index 8f245db..e7feec3 100644 --- a/conversion/load_data.sql +++ b/conversion/load_data.sql @@ -138,6 +138,28 @@ INSERT INTO comm_membs ( ORDER BY cm_start_date, cm_end_date, cm_b_animid, cm_cl_community_id; +-- biography_update_log -> biography_log +INSERT INTO biography_log ( + dateofupdate + ,animid + ,description + ,rationale + ,madeby) + SELECT + date_of_update + , chimp_id + , update_description + , update_rationale + , CASE -- This solves NULL data problems; problem #19 + WHEN made_by IS NULL + THEN 'UNK' + ELSE made_by + END CASE + FROM biography_update_log as log + -- Get a consistent id generation + ORDER BY date_of_update, chimp_id, update_rationale, made_by; + + -- community_membership_update_log -> comm_memb_log INSERT INTO comm_memb_log ( dateofupdate -- 2.34.1