如何获得/返回空白结果 [英] How to get / return blank a result

查看:100
本文介绍了如何获得/返回空白结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好专家,



我现在差不多一个小时都在努力解决问题,我现在需要帮助。



我想在此查询中返回空格或null而不是0:



Hello Experts,

I am struggling with issue for almost an hour now and I now need a help.

I want to return a blank or null instead of 0 as a result from this query:

COALESCE(CONVERT(FLOAT,ROUND(SUM(
 CASE WHEN [t].Berichtsperiode = @Periode1 THEN [t].[ABC Vorschau] END),0)),0)/1000 AS [ABC alt]





我的结果:0



预期结果:或null



My result : 0

Expected result: or null

推荐答案

它非常简单,你所要做的就是消除转换为null的COALESCE函数进入0
Its pretty simple, all you have to do is eliminate COALESCE function which is converting null into "0"


这篇关于如何获得/返回空白结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆