From 722fa875a887a12564746a9ddf6a7ece38f2ee54 Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Fri, 27 Oct 2023 11:49:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8C=AF=E5=88=86=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=A0=85=E7=9B=AEUPSERT=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...m_distribution_Call2_Discussion_vod__c.sql | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql index 1fd4e4ea..ed3b272e 100644 --- a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql +++ b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql @@ -40,23 +40,23 @@ START TRANSACTION; -- UPSERT STATEMENT設定 SET @upsert_statement_base = 'INSERT INTO $$distribution_schema$$.crm_Call2_Discussion_vod__c( - Id, IsDeleted, Name, RecordTypeId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, MayEdit, - IsLocked, Account_vod__c, Call2_vod__c, Activity__c, Comments__c, Contact_vod__c, Call_Date_vod__c, Product_Strategy_vod__c, - Product_Tactic_vod__c, Restricted_Comments__c, Product_vod__c, Presentation__c, Discussion_Topics__c, Slides__c, User_vod__c, - Indication__c, Mobile_ID_vod__c, Medical_Event_vod__c, Is_Parent_Call_vod__c, Override_Lock_vod__c, zvod_Product_Map_vod__c, - Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Account_Tactic_vod__c, MSJ_Material_Type__c, MSJ_Discussion_Contents__c, - MSJ_IST_Minutes__c, MSJ_Off_Label_Minutes__c, MSJ_Discussion_Objectives__c, MSJ_Insight__c, EMDS_Materials__c, EMDS_Topic__c, - MSJ_Visit_Purpose__c, MSJ_Insight_Count__c, - file_name, file_row_cnt, delete_flg, ins_user, ins_date, upd_user, upd_date) + Id, IsDeleted, Name, RecordTypeId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, MayEdit, + IsLocked, Account_vod__c, Call2_vod__c, Activity__c, Comments__c, Contact_vod__c, Call_Date_vod__c, Product_Strategy_vod__c, + Product_Tactic_vod__c, Restricted_Comments__c, Product_vod__c, Presentation__c, Discussion_Topics__c, Slides__c, User_vod__c, + Indication__c, Mobile_ID_vod__c, Medical_Event_vod__c, Is_Parent_Call_vod__c, Override_Lock_vod__c, zvod_Product_Map_vod__c, + Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Account_Tactic_vod__c, MSJ_Material_Type__c, MSJ_Discussion_Contents__c, + MSJ_IST_Minutes__c, MSJ_Off_Label_Minutes__c, MSJ_Discussion_Objectives__c, MSJ_Insight__c, EMDS_Materials__c, EMDS_Topic__c, + MSJ_Visit_Purpose__c, MSJ_Insight_Count__c, medaca_parent_record_type_id, file_name, file_row_cnt, delete_flg, ins_user, + ins_date, upd_user, upd_date) SELECT - Id, IsDeleted, Name, RecordTypeId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, MayEdit, - IsLocked, Account_vod__c, Call2_vod__c, Activity__c, Comments__c, Contact_vod__c, Call_Date_vod__c, Product_Strategy_vod__c, - Product_Tactic_vod__c, Restricted_Comments__c, Product_vod__c, Presentation__c, Discussion_Topics__c, Slides__c, User_vod__c, - Indication__c, Mobile_ID_vod__c, Medical_Event_vod__c, Is_Parent_Call_vod__c, Override_Lock_vod__c, zvod_Product_Map_vod__c, - Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Account_Tactic_vod__c, MSJ_Material_Type__c, MSJ_Discussion_Contents__c, - MSJ_IST_Minutes__c, MSJ_Off_Label_Minutes__c, MSJ_Discussion_Objectives__c, MSJ_Insight__c, EMDS_Materials__c, EMDS_Topic__c, - MSJ_Visit_Purpose__c, MSJ_Insight_Count__c, - file_name, file_row_cnt, delete_flg, ins_user, ins_date, upd_user, upd_date + Id, IsDeleted, Name, RecordTypeId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, MayEdit, + IsLocked, Account_vod__c, Call2_vod__c, Activity__c, Comments__c, Contact_vod__c, Call_Date_vod__c, Product_Strategy_vod__c, + Product_Tactic_vod__c, Restricted_Comments__c, Product_vod__c, Presentation__c, Discussion_Topics__c, Slides__c, User_vod__c, + Indication__c, Mobile_ID_vod__c, Medical_Event_vod__c, Is_Parent_Call_vod__c, Override_Lock_vod__c, zvod_Product_Map_vod__c, + Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Account_Tactic_vod__c, MSJ_Material_Type__c, MSJ_Discussion_Contents__c, + MSJ_IST_Minutes__c, MSJ_Off_Label_Minutes__c, MSJ_Discussion_Objectives__c, MSJ_Insight__c, EMDS_Materials__c, EMDS_Topic__c, + MSJ_Visit_Purpose__c, MSJ_Insight_Count__c, medaca_parent_record_type_id, file_name, file_row_cnt, delete_flg, ins_user, + ins_date, upd_user, upd_date FROM internal02.crm_Call2_Discussion_vod__c AS internaltb WHERE @@ -75,7 +75,8 @@ SET @upsert_statement_base = MSJ_Insight__c=internaltb.MSJ_Insight__c, EMDS_Materials__c=internaltb.EMDS_Materials__c, EMDS_Topic__c=internaltb.EMDS_Topic__c, MSJ_Visit_Purpose__c=internaltb.MSJ_Visit_Purpose__c, MSJ_Insight_Count__c=internaltb.MSJ_Insight_Count__c, file_name=internaltb.file_name, file_row_cnt=internaltb.file_row_cnt, - upd_user = CURRENT_USER(), upd_date = CURRENT_TIMESTAMP();'; + upd_user = CURRENT_USER(), upd_date = CURRENT_TIMESTAMP(), + medaca_parent_record_type_id = internaltb.medaca_parent_record_type_id;'; OPEN table_cursor; From 61e6e538c2b4b1a330a5bce0db52d8d5980c1fd9 Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Fri, 27 Oct 2023 13:04:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8C=AF=E5=88=86=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E5=A0=B4=E6=89=80=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal02/crm_distribution_Call2_Discussion_vod__c.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql index ed3b272e..f1de1f3c 100644 --- a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql +++ b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Discussion_vod__c.sql @@ -74,9 +74,8 @@ SET @upsert_statement_base = MSJ_IST_Minutes__c=internaltb.MSJ_IST_Minutes__c, MSJ_Off_Label_Minutes__c=internaltb.MSJ_Off_Label_Minutes__c, MSJ_Discussion_Objectives__c=internaltb.MSJ_Discussion_Objectives__c, MSJ_Insight__c=internaltb.MSJ_Insight__c, EMDS_Materials__c=internaltb.EMDS_Materials__c, EMDS_Topic__c=internaltb.EMDS_Topic__c, MSJ_Visit_Purpose__c=internaltb.MSJ_Visit_Purpose__c, MSJ_Insight_Count__c=internaltb.MSJ_Insight_Count__c, - file_name=internaltb.file_name, file_row_cnt=internaltb.file_row_cnt, - upd_user = CURRENT_USER(), upd_date = CURRENT_TIMESTAMP(), - medaca_parent_record_type_id = internaltb.medaca_parent_record_type_id;'; + medaca_parent_record_type_id = internaltb.medaca_parent_record_type_id, file_name=internaltb.file_name, file_row_cnt=internaltb.file_row_cnt, + upd_user = CURRENT_USER(), upd_date = CURRENT_TIMESTAMP();'; OPEN table_cursor;