help

J

JudyT

egineer wrote this code and I need help deciphering it.

count(*)-count([closingDate])

okay, I understand he is counting and that he wants to minus that count to
get a zero or the count less then count but what does the asterik do for it?
if he is counting will it not count it all?

Help confused.
 
D

Douglas J. Steele

Count(*) means count all of the rows.

Count([closingDate]) means count all of the rows where closingDate is not
Null.
 
J

JudyT

but why did he not put that in the criteria as in "Is Not Null" for the
closing date?

Douglas J. Steele said:
Count(*) means count all of the rows.

Count([closingDate]) means count all of the rows where closingDate is not
Null.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JudyT said:
egineer wrote this code and I need help deciphering it.

count(*)-count([closingDate])

okay, I understand he is counting and that he wants to minus that count to
get a zero or the count less then count but what does the asterik do for
it?
if he is counting will it not count it all?

Help confused.
 
D

Douglas J. Steele

Because then Count(*) would have been exactly the same as
Count([closingDate])

Both occurances of "all rows" in my original answer meant "all rows returned
by the query", not "all rows existing in the table" (sorry for the
ambiguity)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JudyT said:
but why did he not put that in the criteria as in "Is Not Null" for the
closing date?

Douglas J. Steele said:
Count(*) means count all of the rows.

Count([closingDate]) means count all of the rows where closingDate is not
Null.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JudyT said:
egineer wrote this code and I need help deciphering it.

count(*)-count([closingDate])

okay, I understand he is counting and that he wants to minus that count
to
get a zero or the count less then count but what does the asterik do
for
it?
if he is counting will it not count it all?

Help confused.
 
Top