Count If (1 Viewer)

Purdue15

Registered User.
Local time
Yesterday, 23:54
Joined
Jun 12, 2013
Messages
29
How do I count only filled out data in a query? I am using the count function and it counts blank and filled out records, I just want the filled out ones. Please be specific thanks
 

Brianwarnock

Retired
Local time
Today, 07:54
Joined
Jun 2, 2003
Messages
12,701
You must be using Count(*) use Count(fieldname)
I suggest you read help on Count

Brian
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:54
Joined
Feb 19, 2002
Messages
43,223
Count(*) counts ALL selected rows.
Count(fieldname) counts ALL non-null values of fieldname in selected rows.

Count(*) is faster on large recordsets since the database engine can frequently get a count by looking in its statistics. With Count(fieldname), the db engine will need to examine every row in the table so large tables might take some time.
 

Users who are viewing this thread

Top Bottom