zoukankan      html  css  js  c++  java
  • U8 存货期初余额 货位

    1、InvpositionSum:存货货位存量表

    2、invPosition:存货货位记录表

    3、期初:select a.cwhcode,b.cinvcode,b.iquantity,isnull(b.cfree1,'测试') cfree1,isnull(b.cfree2,'测试') cfree2,isnull(b.cfree3,'测试') cfree3,b.cposition from rdrecord34 a left join rdrecords34 b on a.id=b.id

    1是2的group合计

    2和3一一对应

    期初出错删除顺序:

    delete from Rdrecords34 where id in (select id from Rdrecord34 where cwhcode ='214')

    delete from Rdrecord34 where cwhcode ='214'

    delete from invPosition where cwhcode ='214'

    delete from InvpositionSum where cwhcode ='214'

    修改自由项

    update InvpositionSum set cfree1=UFDATA_006_2018..qichukucun.cfree1 from UFDATA_006_2018..qichukucun

    where InvpositionSum.autoid=UFDATA_006_2018..qichukucun.autoid

    select * from (select a.cwhcode,b.cinvcode,b.iquantity,isnull(b.cfree1,'测试') cfree1,isnull(b.cfree2,'测试') cfree2,isnull(b.cfree3,'测试') cfree3,b.cposition from rdrecord34 a left join rdrecords34 b on a.id=b.id ) c left join

    (select cwhcode,cinvcode,iquantity,(case cfree1 when '' then '测试' else cfree1 end) cfree1,(case cfree2 when '' then '测试' else cfree2 end) cfree2,(case cfree3 when '' then '测试' else cfree3 end) cfree3,cposcode from InvpositionSum ) d on

    c.cwhcode=d.cwhcode and c.cinvcode=d.cinvcode and c.cposition=d.cposcode and c.cfree1=d.cfree1 and c.cfree2=d.cfree2 and c.cfree3=d.cfree3

  • 相关阅读:
    C#socket客户端自己输入消息发送到服务端通信实现通信
    C#设计模式:观察者模式(Observer Pattern)
    C#冒泡排序法学习
    强类型和弱类型
    计算机网络基础知识总结
    推荐几个搜索资源网站
    推荐几个搜索资源网站
    前端:闭包的概念
    前端:闭包的概念
    收集12个经典的程序员段子
  • 原文地址:https://www.cnblogs.com/passerlee/p/9999994.html
Copyright © 2011-2022 走看看