日期:2014-05-18 浏览次数:20482 次
select ISNULL(sum(F_User_point),0) as gjpoint FROM ...
------解决方案--------------------
select isnull(sum(F_User_point),0) as gjpoint from TB_CDR where Calling_Station_Id='0411990005'
and Called_Station_Id like '00%'
and convert (varchar(10),convert(dateTime, h323_connect_Time),112) like '200803%'
------解决方案--------------------
ISNULL(sum(F_User_point),0) as gjpoint
------解决方案--------------------
select 'gjpoint'=isnull(sum(F_User_point),0) from TB_CDR where Calling_Station_Id='0411990005' and Called_Station_Id like '00%' and convert (varchar(10),convert(dateTime, h323_connect_Time),112) like '200803%'
------解决方案--------------------
select isnull(sum(F_User_point),0) as gjpoint from TB_CDR where Calling_Station_Id='0411990005' and Called_Station_Id like '00%' and convert (varchar(10),convert(dateTime, h323_connect_Time),112) like '200803%' --或者 select case when sum(F_User_point) is null then 0 else sum(F_User_point) end as gjpoint from TB_CDR where Calling_Station_Id='0411990005' and Called_Station_Id like '00%' and convert (varchar(10),convert(dateTime, h323_connect_Time),112) like '200803%'
------解决方案--------------------
解决就结贴。
------解决方案--------------------
用函数isnull(col,0)
------解决方案--------------------