--WorkingTable备份
INSERT INTO FIN.PP_AnM_ActivityExpenseTypeSnapshot (FInDataSnapshotId,Year,BudgetOwnerId,BrandId,ActivityId,ExpenseTypeId,Q1Value,Q2Value,Q3Value,Q4Value,Q1Locked,Q2Locked,Q3Locked,Q4Locked,FYTotal,FYAmount,WBSCode,ActivityCode,ActivityName,ExpenseTypeCode,ExpenseTypeName,LevelOneId,Levels,LevelTwoId,Structure,LevelThreeValue,NavId,WorkRate,BudgetOwnerCode,FunctionName,BrandName,AETId,WBSActivityCode,ApprovedValue,ApprovalStatus,IsFinance)
SELECT '427ba9d4-5ad3-41b1-b4b1-68f963dabd8d',a.Year,a.BudgetOwnerId,a.BrandId,a.ActivityId,a.ExpenseTypeId,a.Q1Value,a.Q2Value,a.Q3Value,a.Q4Value,a.Q1Locked,a.Q2Locked,a.Q3Locked,a.Q4Locked,a.FYTotal,a.FYAmount,a.WBSCode,a.ActivityCode,a.ActivityName,a.ExpenseTypeCode,a.ExpenseTypeName,a.LevelOneId,a.Levels,a.LevelTwoId,a.Structure,a.LevelThreeValue,a.NavId,a.WorkRate,a.BudgetOwnerCode,a.FunctionName,a.BrandName,a.AETId,a.WBSActivityCode,a.ApprovedValue,a.ApprovalStatus,b.IsFinance FROM PP_China_AnM_BP.VIEWActivityExpenseType a
LEFT JOIN FIN.PP_AnM_BudgetOwner b
ON a.BudgetOwnerId = b.Id AND a.Year = b.Year
--BudgetShift备份
INSERT INTO FIN.PP_AnM_BudgetShiftSnapshot(SnapshotId,BudgetShiftId,FromWBSCode,ToWBSCode,BUApprovalStatus,FINApprovalStatus,Status,ActivityShiftTotal,Type)
SELECT '427ba9d4-5ad3-41b1-b4b1-68f963dabd8d',BudgetShiftId,FromWBS,ToWBS,BUApprovalStatus,FinApprovalStatus,Status,ActivityShiftTotal,Type FROM PP_China_AnM_BP.VIEWBudgetShiftSnapshot
--Reinvestment备份
INSERT INTO FIN.PP_AnM_ReinvestManagementSnapshot(SnapshotId,ReinvestmentId,Year,Code,Comments,Type,BudgetOwnerId,BrandId,FX,CurrencyType,USDAmount,CNYAmount,RemainAmount,ApprovalStatus,Status,ProjectCode,UpdateDate,UpdateBy)SELECT '427ba9d4-5ad3-41b1-b4b1-68f963dabd8d',Id,Year,Code,Comments,Type,BudgetOwnerId,BrandId,FX,CurrencyType,USDAmount,CNYAmount,RemainAmount,ApprovalStatus,Status,ProjectCode,UpdateDate,UpdateBy FROM FIN.PP_AnM_ReinvestmentManagement
标签:PP,在线,Luke,BudgetOwnerId,笔记,Type,Year,FIN,AnM From: https://www.cnblogs.com/bzpfly/p/16935499.html