• 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# 中==和Equal的区别
    3dmath复习随笔
    3dmax学习资料记录
    [官方教程] Unity 5 BLACKSMITH深度分享
    [技术] [插件精选] 炫酷粒子特效(下)
    Unity3D总结:关于射线碰撞
    Unity3D将来时:IL2CPP(上)
    3DMAX 9 角色建模3 uv展开
    php,c# hamsha1
    U3D 的一些基础优化
  • 原文地址:https://www.cnblogs.com/xujiating/p/6295995.html
Copyright © 2020-2023  润新知