我的代碼:- preprocessed_source作為創建或替換臨時視圖
選擇
Key_ID,
Distributor_ID,
Customer_ID,
Customer_Name,
通道
從integr_masterdata.Customer_Master;
步驟2:使用預處理源表執行合並操作
合並成slvr_masterdata。Customer_Master作為目標
使用preprocessed_source作為源
在
源。Key_ID = Target.Key_ID
當匹配
更新設置
目標。Distributor_ID = Source.Distributor_ID,
目標。Customer_ID = Source.Customer_ID,
目標。Customer_Name = Source.Customer_Name,
目標。通道= Source.Channel,
目標。Time_Stamp = current_timestamp ()
當不匹配
然後插入
(
Distributor_ID,
Customer_ID,
Customer_Name,
頻道,
Time_Stamp
)
值(
Source.Distributor_ID,
Source.Customer_ID,
Source.Customer_Name,
Source.Channel,
current_timestamp ()
)
Thankuu沃納為你的答案. .我不得不刪除重複的在相同的代碼嗎?…你能提供我的代碼嗎?