飞天魔神|张杰|农民工|城市搬运者|码字机器飞天魔神|张杰|农民工|城市搬运者|码字机器

统计库存量

select
v_ex_currentstockquery.cWhCODE as '仓别',
v_ex_currentstockquery.cWhName as '仓库',
b.cInvCode as '物料编码',
inventory.cinvname as '存货名称',
v_ex_currentstockquery.cInvStd as '规格型号',
isnull(v_ex_currentstockquery.iQuantity,0) as '数量',
b.iNatUnitPrice as '最新价格 ',
isnull(v_ex_currentstockquery.iQuantity,0)*b.iNatUnitPrice as '合计'
 from  v_ex_currentstockquery
 left join (
 select iNatUnitPrice,PO_Podetails.cInvCode from PO_Podetails,
(select MAX(id) as id ,cInvCode from PO_Podetails
group by cInvCode)a
  where PO_Podetails.ID=a.id and
 PO_Podetails.cInvCode=a.cinvcode)
 b
 on b.cInvCode= v_ex_currentstockquery.cinvcode
  left join inventory on inventory.cinvcode=b.cinvcode
  where  v_ex_currentstockquery.cWhCode in
  ('100','101','102','103','104','105','106','107','108','120','121','122','123','124','125','126','127','128','129','200','201','202','203','204','205','206','207','208','209','210','211','212','220','221','222','223','224','225','226','227','228','302','303','304','305','306','307','308','309')

UOC查找删除黑名单命令

SELECT *
FROM ST_BlackPerson
WHERE (Card_No = 13580) /*查询人员卡号是否在黑名单*/

delete from ST_BlackPerson
where (Card_No = 13580)  /*把在黑名单内的人员踢出,恢复卡号正常使用*/