标签:current code select 商品 group art asc from tst
use UFTData502874_000009;
select a.id as 商品编号
,a.code as 编号
,a.NAME as 商品名称
,a.productInfo as 品牌
,a.specification as 规格型号
,a.lowQuantity as 最低库存量
,c.baseQuantity as 库存量单位
,c.subQuantity as 库存量辅单位
from dbo.AA_Inventory a
left join (select idinventory,baseQuantity,subQuantity from ST_CurrentStock)c on c.idinventory=a.id
--left join dbo.ST_CurrentStock c on c.idinventory=a.id
--where a.lowQuantity is not null
--group by a.id,a.code,a.NAME,a.specification,a.lowQuantity
-- group by id,code,NAME,specification,lowQuantity
-- group by a.id,a.code,a.NAME,a.specification,a.lowQuantity
-- ST_CurrentStock -- 现存量表
-- select idinventory from dbo.ST_CurrentStock
select idinventory,pa.name
from dbo.Pu_PurchaseRequisition_b b
left join (select * from dbo.Pu_PurchaseRequisition)p on p.id=b.idPurchaseRequisitionDTO
left join (select * from dbo.AA_Partner )pa on pa.id=p.id;
select * from dbo.Pu_PurchaseRequisition p
left join (select * from dbo.AA_Partner )pa on pa.id=p.id;
-------------------------------------------------------
use UFTData502874_000009;
select * from dbo.AA_Partner where name like‘%公司%‘;
select * from dbo.AA_Partner where name like‘%凤祥%‘;
select * from dbo.AA_Partner where code=‘010003‘;
-- 类型为1 的是 供应商公司
select * from dbo.AA_Partner where idpartnerclass=‘1‘ order by code asc;
-- 公司编号 code 010001
-- 供应商的ID 等于 采购单的 idsuggpartner
select * from dbo.Pu_PurchaseRequisition
--insert into dbo.Pu_PurchaseRequisition
标签:current code select 商品 group art asc from tst
原文地址:https://www.cnblogs.com/danJuly/p/10281702.html