zoukankan      html  css  js  c++  java
  • 0118工作备份

    select * from ICTransType
    select * from ICTemplateEntry where fid='B08'
    select * from ppbom where FBillNo='PBOM000278'
    select * from ppbomentry where FInterID=1278
    select ficmointerid from ICStockBillEntry
    select * from t_Department
    select * from t_Item where FItemClassID=2
    select a1.fitemid,a1.FAuxQty,a1.FICMOInterID from ICStockBillEntry a1 inner join ppbom b1 on a1.FICMOInterID=b1.FICMOInterID

    inner join ICStockBill c1 on a1.finterid=c1.finterid where c1.FTranType=28
    select * from ppbom where FICMOInterID=1380
    select fitemid,FAuxStockQty from ppbomentry where FInterID=1618

    DECLARE @FFAUXQTY decimal(18,10)
    DECLARE @FITEMID int
    DECLARE @FDCSTOCKID int
    DECLARE @finterid int
    DECLARE @FAuxStockQty int
    DECLARE @FTranType int
    DECLARE @FAuxQtyMust decimal(18,10)
    DECLARE @FICMOInterID int
    DECLARE @ppbomfinterid int
    DECLARE @FQTY decimal(18,10)
    DECLARE @FAUXQTY decimal(18,10)
    DECLARE #point_cursor CURSOR
    FOR
    SELECT a1.FItemID ,a1.FAuxQty,a1.FICMOInterID from
    ICStockBillEntry a1 inner join ppbom b1 on a1.FICMOInterID=b1.FICMOInterID
    inner join ICStockBill c1 on a1.finterid=c1.finterid where c1.FTranType=28
    OPEN #point_cursor
    FETCH NEXT FROM #point_cursor INTO @fitemid,@FAuxStockQty,@FICMOInterID
    while @@fetch_status = 0
    BEGIN

    select @ppbomfinterid=finterid from PPBOM where FICMOInterID=@FICMOInterID
    update ppbomentry set FAuxStockQty=FAuxStockQty+@FAuxStockQty where FInterID=@ppbomfinterid and FItemID=@FITEMID
    FETCH NEXT FROM #point_cursor INTO @fitemid,@FAuxStockQty,@FICMOInterID
    END
    CLOSE #point_cursor
    DEALLOCATE #point_cursor

    update ppbomentry set FAuxStockQty=0

  • 相关阅读:
    C# 杂活
    常用 SQL Server 规范集锦
    C# 文件操作
    使用Git 本地代码提交到 GitHub
    Numpy的小总结
    C#最佳工具集合:IDE、分析、自动化工具等
    Web服务器、应用服务器、Web容器、反向代理服务器区别与联系
    Platt SMO 和遗传算法优化 SVM
    Pycharm配置(三)
    Pycharm配置(二)
  • 原文地址:https://www.cnblogs.com/xujiating/p/6295995.html
Copyright © 2011-2022 走看看