日期:2014-05-18 浏览次数:20545 次
SELECT A.productid AS 药品ID,A.productname AS 药品名, CASE WHEN NOT EXISTS(SELECT 1 FROM stock WHERE productid=A.productid AND type='1' AND month(updatetime)=5) THEN '未采购' END AS remark, CASE WHEN NOT EXISTS(SELECT 1 FROM stock WHERE productid=A.productid AND type='2' AND month(updatetime)=5) THEN '未出库' END AS remark2 FROM product a