The column is NULLABLE, and some of the rows have NULL
values. However, in my query I had a single condition
saying - the query looks similar to this:
SELECT *
FROM TABLENAME
WHERE COLUMNNAME = 'CK'
Can you explain a bit further what you mean with
"Usually that is the case." in relation to NULL
values?
Thanx,
Albert
--- John Yuan <[Email address protected] wrote:
> Any of those columns after 'where' contains NULL?
> Usually that is the case.
>
> -----Original Message-----
> From: Albert van Biljon
>
[mailto:mssqldba-ezmlmshield-x61378885.[Email address protected]
>
> Sent: Monday, February 28, 2005 9:43 AM
> To: LazyDBA Discussion
> Subject: Missing Statistics
>
> Hi,
>
> I'm having a recurring problem which is of big
> concern
> to both me (SQL developer) and the users.
>
> Sometimes when issueing a SELECT-query with a
> WHERE-clause, rows which definately should be
> returned
> in the result set, are missing. Analyzing the
> execution plan shows that some STATISTICS are
> missing.
> When I create these STATISTICS, the correct results
> are returned!
>
> I always had the impression that STATISTICS are
> there
> only for performance improvement, not to actually
> make
> queries work.
>
> Can anyone shed some light on this please? So far
> searching BOL and the web haven't come up with any
> explanation.
>
> Server is SQL 2000 Service Pack 3 - 64-bit edition
> (althouh I've had the same problem on 32-bit).
>
> Regards,
> Albert van Biljon
MS Sql Server LazyDBA home page