标签:sp on ef sql as ui tt rom 函数
SELECT COALESCE(SUM((price/priceper)*QtyRequired),0) as total_value,
COALESCE(SUM((price/priceper)*QtyRequired),0) as outstanding_value
FROM @Item i
LEFT OUTER JOIN @OrderItem o ON i.Id = o.ItemId
WHERE i.Id = @ItemIdTest
group by itemId
标签:sp on ef sql as ui tt rom 函数
原文地址:http://www.cnblogs.com/damoco/p/4015750.html