振分判断項目UPSERTに追加

This commit is contained in:
Nik Afiq 2023-10-27 11:49:15 +09:00
parent 64c4352c45
commit 722fa875a8

View File

@ -46,8 +46,8 @@ SET @upsert_statement_base =
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)
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,
@ -55,8 +55,8 @@ SET @upsert_statement_base =
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
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;