1、三个视图:注意视图的日期
dbo.VIEW_Inventory_end
dbo.VIEW_Inventory_InOut
dbo.VIEW_Inventory_Invent

2、检查视图dbo.VIEW_Inventory_Invent是否与库存量查询中的一致。

3、--临时表
UPDATE [dbo].[TBL_StockInventoryTemp]
SET PeriodStartAmount = [VIEW_Inventory_end].PeriodEndAmount,[InAmount]=[InCome], [OutAmount]=[OutCome] ,PeriodEndAmount = EndCome
from [VIEW_Inventory_end]
WHERE [TBL_StockInventoryTemp].[MaterialNo] = [VIEW_Inventory_end].[MaterailNo]
And  [TBL_StockInventoryTemp].[BranchNo]= 'zc'

相关文章:

  • 2021-04-28
  • 2021-08-26
  • 2021-05-22
  • 2021-12-06
  • 2021-12-03
  • 2021-12-06
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-02-04
  • 2021-07-21
  • 2022-12-23
  • 2021-04-05
相关资源
相似解决方案