Groups | Blog | Home
all groups > sql server (microsoft) > august 2005 >

sql server (microsoft) : Strange SQL problem


Milan
8/11/2005 2:42:41 PM
Hi guys


I have experinced some strange sql problem.
There is the query I execute.


------------------------------=AD-------------


Select count(field_A) from table Table_A
where field_A is null and field_A is not null
------------------------------=AD--------------
Field_A is integer nulls alowed (indexed)
table_A is close to 20 million records
------------------------------=AD-------------------


It gives me some count (arround 300,000) and every time I run the query
it is different count.


Has anybody experinced this before?=20


Thanks=20
Milan
louis
8/13/2005 5:48:42 PM
The query's Where condition is non-sensical. Is this a typo? A column
is either null or not null. It's the same as saying Where x=1 and x<>1.
AddThis Social Bookmark Button