>Hi everybody,
>
>Suppose, you have a file with 20000 records. Is there a way to check, if field contains NULLs or not for the whole file except for scanning through it and check each field, which would be time consuming...
>
>I just thought about another idea: select sum(iif(isnull(field1,1,0)) as Field1NullsCnt, etc.
> but it would be slow too...
>
>Do you have other suggestions?
SELECT COUNT(*) As TotalRec, COUNT(filed1) As NotNullRec ...
or
SELECT COUNT(*) - COUNT(filed1) As NullRecCnt ...
This way you can even count nulls in more than one column.
--sb--