如何在我的case语句中使用我命名为QTY的表达式?
cast(((iloc.qty_on_hand) - (iloc.qty_allocated) - (ilocss.qty_non_pickable) -
(ilocss.qty_quarantined) ) / ( item_uom.unit_size ) as decimal (10,2)) AS
[QTY available],
case when (iloc.qty_on_hand) <= (iloc.inv_min) then (iloc.inv_max) -
('QTY available') else 0 end as [Build]