猿问

ifnull没有生效


select 

  IFNULL(Qty*ItemNetWeight,0) Weight,

  IFNULL(ItemUomCode,0) code

  FROM t_oc_transferorderline  

  where HeadID in(

  select id FROM t_oc_transferorderheader where OrderType in ('ZR08')

  )  

  and DATE_FORMAT(CreateTime,'%Y-%m-%d')=DATE_FORMAT('2016-11-08','%Y-%m-%d')

select ifnull(orderNO,0) from t_oc_transferorderheader;


qq_王力_0
浏览 1625回答 0
0回答
随时随地看视频慕课网APP

相关分类

MySQL
我要回答