sql语句常⽤功能(null值转换为0)
COALESCE(规格,' ')
或者
手机和电脑怎么连接我为你唱首歌COALESCE(规格,0)
lect*
from (
SELECT p2.name_template 产品, p3.pname 材料 ,p3.spec 尺⼨,(lect c2.name from product_part_info c1 LEFT JOIN res_huo c2 ON
c1.hpartner_id=c2.id where p3.id=c1.product_tmpl_id order by c1.id limit 1) 客户,(lect khwl_code from product_custo_info where
p3.id=product_tmpl_id order by id limit 1) 物料号,p4.name 内部批次,p4.outsidename 外部批次,p1.库存,p5.总库存
石溜
心疼你的过去
FROM (SELECT SUM(qty) 存量,product_id,lot_id
FROM stock_kqty p1
大学生短期支教
WHERE location_id=${仓}
GROUP BY product_id,lot_id) p1
LEFT JOIN product_code p2 ON p2.id=p1.product_id
LEFT JOIN product_tep p3 ON p3.id =p2.product_tmpl_id
幼儿生日祝福语LEFT JOIN stock_pci_lot p4 ON p4.id=p1.lot_id
LEFT JOIN (SELECT SUM(qty) 总存量,product_id
FROM stock_kqty p1每一个明天
WHERE location_id=${仓}
GROUP BY product_id
)
p5 ON p2.id=p5.product_id
) abc
辰字组词
where (产品like'%${产品}%'or COALESCE(材料,'') like'%${产品}%'or COALESCE(尺⼨,'') like'%${产品}%' ) and (客户like'%${客户}%'or客户is null ) and库存<>0
;