wms

select w.warehouse_name,p.barcode,p.product_name,ii.quantity from wms.inventory_item ii
inner join wms.product p on ii.product_id = p.product_id
inner join wms.warehouse w on w.warehouse_id = ii.warehouse_id
where
ii.physical_warehouse_id = 1 and ii.warehouse_id in (13,14,15) and quantity > 0 and ii.customer_id = 27
order by p.barcode

select * from wms.inventory_item where physical_warehouse_id = 1 and warehouse_id in (13,14,15);
select wc.name,w.warehouse_name,p.barcode,p.product_name,ii.quantity
from wms.inventory_item ii
inner join wms.product p on ii.product_id = p.product_id
inner join wms.warehouse_customer wc on wc.customer_id = ii.customer_id
inner join wms.warehouse w on w.warehouse_id = ii.warehouse_id
where ii.physical_warehouse_id = 1 and ii.warehouse_id in (2,4,6) and ii.quantity > 0;

posted @ 2017-02-24 19:06  novalist  阅读(187)  评论(0编辑  收藏  举报