[dba-SQLServer] What gives with Null (or the lack thereof)

Mark Breen marklbreen at gmail.com
Fri Jul 27 04:01:58 CDT 2012


Hello John,

You were lucky to find it, those problems can often take hours to find,

Mark


On 26 July 2012 16:11, jwcolby <jwcolby at colbyconsulting.com> wrote:

> Never mind.  I had a string value 'null' in there which is (of course) not
> NULL.
>
> Sigh.
>
>
> John W. Colby
> Colby Consulting
>
> Reality is what refuses to go away
> when you do not believe in it
>
> On 7/26/2012 9:54 AM, jwcolby wrote:
>
>> I have two queries:
>>
>> SELECT [EM_Email]
>>        ,[EM_EmailDomain]
>>    FROM [_DataEmail].[dbo].[tblEmail_**Live]
>>    WHERE EM_EmailDomain is null
>> GO
>>
>> Returns nothing.
>>
>> SELECT     TOP (100) PERCENT COUNT(PK) AS Cnt, EM_EmailDomain
>> FROM         dbo.tblEmail_Live
>> GROUP BY EM_EmailDomain
>> ORDER BY Cnt DESC
>>
>> returns null as the top most common EM_EmailDomain
>>
>> Same table, same field, one query says I have lots of null values by
>> count, the other query refuses
>> to show them to me.
>>
>> I'm confused.
>>
>>
> ______________________________**_________________
> dba-SQLServer mailing list
> dba-SQLServer@**databaseadvisors.com <dba-SQLServer at databaseadvisors.com>
> http://databaseadvisors.com/**mailman/listinfo/dba-sqlserver<http://databaseadvisors.com/mailman/listinfo/dba-sqlserver>
> http://www.databaseadvisors.**com <http://www.databaseadvisors.com>
>
>


More information about the dba-SQLServer mailing list