数量上没有显示0中的项目

时间:2016-10-20 17:15:55

标签: sql-server

我的问题是我必须在手上显示数量+数量已分配+数量后退。

使用我所拥有的查询显示为0时手头数量所需的所有内容。这是我的查询:

SELECT item_location_view.item_id AS 'Item',
item_location_view.item_desc AS 'Description',
inv_mast.class_id1 AS 'Brand', 
item_location_view.location_id AS 'Location', 
item_location_view.qty_on_hand AS 'Qty on Hand',
item_location_view.qty_allocated AS 'Qty Allocated',
item_location_view.qty_on_po AS 'Qty on PO', 
item_location_view.qty_backordered AS 'Qty Backordered',
qty_on_hand-qty_allocated AS 'Qty Available',
item_location_view.moving_average_cost AS 'Cost', 
item_location_view.price1 AS 'Price', 
item_location_view.purchase_discount_group AS 'Group', 
item_location_view.product_group_id AS 'Product Group', 
item_location_view.product_group_desc AS 'Prod Group Description', 
item_location_view.last_purchase_date AS 'Last Purchase Date', 
inv_mast.weight AS 'Cube Master Pack',
inv_mast.net_weight AS 'Cube',
inv_mast.cube AS 'Weight', 
inv_mast.purchasing_weight AS 'Purchasing Volume'
dbo.inv_mast inv_mast, 
dbo.item_location_view_item_location_view
WHERE inv_mast.item_id = item_location_view.item_id AND       ((item_location_view.location_id<$300) AND (item_location_view.qty_on_hand=>$0 and item_location_view.qty_allocated >0 and item_location_view.qty_backordered >0))
ORDER BY item_location_view.item_id

0 个答案:

没有答案