jwcolby
jwcolby at colbyconsulting.com
Thu Jul 26 10:11:54 CDT 2012
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. >