警告:聚合或其他SET操作消除了空值。 [英] Warning: Null value is eliminated by an aggregate or other SET operation.

查看:73
本文介绍了警告:聚合或其他SET操作消除了空值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select distinct t.HICN,t.PatientName,t.PracticeName, t.HCCDescription+ isnull(pp.HCC_Description,'')  as HCCDescription
 from temptbl_CCMData  t left outer join VwLatestPatientDetails vw on vw.hicnumber=t.hicn
  left outer join icdhcc pp on pp.HCC=t.HCCDescription WHERE VW.taxid=593516436

推荐答案

这是因为记录中有空值,并且您正在将它用于创建此错误的操作或者。



解决这个问题的一种方法是解雇以下问题:



This is because there are null values in the records and you are using it for operations which will create this error.

One way to get rid of this problem is firing the below:

SET ANSI_WARNINGS OFF
GO


我认为问题在于这一行



I think problem is in this line

t.HCCDescription+ isnull(pp.HCC_Description,'')

例如,如果第二个字段为null,那么您尝试将第一个字段与空对象连接起来,以便它抛出该错误。



我要求你试试以下查询





for example if second filed is null then you are trying to concatenate the first field with null object, so that it's throwing that error.

I request you to please try below query


select distinct t.HICN,t.PatientName,t.PracticeName,ISNULL(Convert(varchar(100), t.HCCDescription)+ Convert(varchar(100),pp.HCC_Description))  as HCCDescription
 from temptbl_CCMData  t left outer join VwLatestPatientDetails vw on vw.hicnumber=t.hicn
  left outer join icdhcc pp on pp.HCC=t.HCCDescription WHERE VW.taxid=593516436


这篇关于警告:聚合或其他SET操作消除了空值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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