From cb404b2baf186056011fd2c6524a3fa939a3def5 Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Fri, 27 Oct 2023 11:39:23 +0900 Subject: [PATCH] =?UTF-8?q?=E6=8C=AF=E5=88=86=E5=88=A4=E6=96=AD=E9=A0=85?= =?UTF-8?q?=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 --- ..._distribution_Call2_Key_Message_vod__c.sql | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Key_Message_vod__c.sql b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Key_Message_vod__c.sql index 3fcaae7f..817fed3f 100644 --- a/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Key_Message_vod__c.sql +++ b/rds_mysql/stored_procedure/internal02/crm_distribution_Call2_Key_Message_vod__c.sql @@ -40,21 +40,21 @@ START TRANSACTION; -- UPSERT STATEMENT設定 SET @upsert_statement_base = 'INSERT INTO $$distribution_schema$$.crm_Call2_Key_Message_vod__c - (Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, - MayEdit, IsLocked, Account_vod__c, Call2_vod__c, Reaction_vod__c, Product_vod__c, Key_Message_vod__c, - Mobile_ID_vod__c, Contact_vod__c, Call_Date_vod__c, User_vod__c, Category_vod__c, Vehicle_vod__c, - Is_Parent_Call_vod__c, Override_Lock_vod__c, CLM_ID_vod__c, Slide_Version_vod__c, Duration_vod__c, - Presentation_ID_vod__c, Start_Time_vod__c, Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Segment_vod__c, - Display_Order_vod__c, Clm_Presentation_Name_vod__c, Clm_Presentation_Version_vod__c, Clm_Presentation_vod__c, - file_name, file_row_cnt, delete_flg, ins_user, ins_date, upd_user, upd_date) + (Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, + MayEdit, IsLocked, Account_vod__c, Call2_vod__c, Reaction_vod__c, Product_vod__c, Key_Message_vod__c, + Mobile_ID_vod__c, Contact_vod__c, Call_Date_vod__c, User_vod__c, Category_vod__c, Vehicle_vod__c, + Is_Parent_Call_vod__c, Override_Lock_vod__c, CLM_ID_vod__c, Slide_Version_vod__c, Duration_vod__c, + Presentation_ID_vod__c, Start_Time_vod__c, Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Segment_vod__c, + Display_Order_vod__c, Clm_Presentation_Name_vod__c, Clm_Presentation_Version_vod__c, Clm_Presentation_vod__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, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, - MayEdit, IsLocked, Account_vod__c, Call2_vod__c, Reaction_vod__c, Product_vod__c, Key_Message_vod__c, - Mobile_ID_vod__c, Contact_vod__c, Call_Date_vod__c, User_vod__c, Category_vod__c, Vehicle_vod__c, - Is_Parent_Call_vod__c, Override_Lock_vod__c, CLM_ID_vod__c, Slide_Version_vod__c, Duration_vod__c, - Presentation_ID_vod__c, Start_Time_vod__c, Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Segment_vod__c, - Display_Order_vod__c, Clm_Presentation_Name_vod__c, Clm_Presentation_Version_vod__c, Clm_Presentation_vod__c, - file_name, file_row_cnt, delete_flg, ins_user, ins_date, upd_user, upd_date + Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, + MayEdit, IsLocked, Account_vod__c, Call2_vod__c, Reaction_vod__c, Product_vod__c, Key_Message_vod__c, + Mobile_ID_vod__c, Contact_vod__c, Call_Date_vod__c, User_vod__c, Category_vod__c, Vehicle_vod__c, + Is_Parent_Call_vod__c, Override_Lock_vod__c, CLM_ID_vod__c, Slide_Version_vod__c, Duration_vod__c, + Presentation_ID_vod__c, Start_Time_vod__c, Attendee_Type_vod__c, Entity_Reference_Id_vod__c, Segment_vod__c, + Display_Order_vod__c, Clm_Presentation_Name_vod__c, Clm_Presentation_Version_vod__c, Clm_Presentation_vod__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_Key_Message_vod__c AS internaltb WHERE @@ -77,7 +77,8 @@ SET @upsert_statement_base = Display_Order_vod__c = internaltb.Display_Order_vod__c, Clm_Presentation_Name_vod__c = internaltb.Clm_Presentation_Name_vod__c, Clm_Presentation_Version_vod__c = internaltb.Clm_Presentation_Version_vod__c, Clm_Presentation_vod__c = internaltb.Clm_Presentation_vod__c, file_name = internaltb.file_name, - file_row_cnt = internaltb.file_row_cnt, upd_user = CURRENT_USER(), upd_date = CURRENT_TIMESTAMP();'; + 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;'; OPEN table_cursor;