L
Laphan
Hi All
I must be doing something realy thick here!
I have a bog standard table that looks basically like the following:
ID AutoNum
Name Text
StartDate DateTime
DOB DateTime
Status Integer
User inputs data into this table data, but the start date and dob are not
mandatory fields.
I wanted to do a simple kind of checklist report that explains to them how
many entries don't have a name, startdate, etc and the text and integer
based queries were 2 second jobs however the DateTime ones won't work.
My query is simply:
select count(STARTDATE) from PEOPLE where STARTDATE= ''
The above generates a date type error so I changed it to:
select count(STARTDATE) from PEOPLE where STARTDATE is null
but it brings back a result of zero even though I know 2 entries don't have
a date. If I do the query the other way, ie not null, then I get the number
of people less the 'no start date' people, so the query knows that these 2
don't have a date but the count won't return it.
Am I right in thinking that I have to reverse query, ie get the total
people, get the total of people who have a start date and then subtract one
from another to get my result???
Pants!!
Rgds
Laphan
I must be doing something realy thick here!
I have a bog standard table that looks basically like the following:
ID AutoNum
Name Text
StartDate DateTime
DOB DateTime
Status Integer
User inputs data into this table data, but the start date and dob are not
mandatory fields.
I wanted to do a simple kind of checklist report that explains to them how
many entries don't have a name, startdate, etc and the text and integer
based queries were 2 second jobs however the DateTime ones won't work.
My query is simply:
select count(STARTDATE) from PEOPLE where STARTDATE= ''
The above generates a date type error so I changed it to:
select count(STARTDATE) from PEOPLE where STARTDATE is null
but it brings back a result of zero even though I know 2 entries don't have
a date. If I do the query the other way, ie not null, then I get the number
of people less the 'no start date' people, so the query knows that these 2
don't have a date but the count won't return it.
Am I right in thinking that I have to reverse query, ie get the total
people, get the total of people who have a start date and then subtract one
from another to get my result???
Pants!!
Rgds
Laphan