What exactly is it that you are trying to do? The SUM code you posted in
your first query doesn't "Change" [Ship_Date] to anything, it evaluates it
and basically counts the number of NULL values in that field.
If you want a list of ship dates, and a count of the number of entries that
have the same ship date, you need a group by clause:
SELECT Ship_Date, COUNT(*) as Freq
FROM Processtbl
GROUP BY Ship_Date
If all you want to do is count the number of NULL values in the Ship_Date
field, then try:
SELECT COUNT(*) as CountOfNulls
FROM Processtbl
WHERE Ship_Date IS NULL
HTH
Dale
ram said:
I receive the compile error in query expression
SELECT Processtbl.Ship_Date,
Sum(IIf(IsNull([Processtbl]![Ship_Date]),1,0))
AS Expr1
FROM Processtbl;
Douglas J. Steele said:
What's the error message? You might also show the SQL for the complete
query, just in case it's not directly related to that calculation.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Hi All,
I have a table with a date field, the default vlaue is set to Null.
When i
run a query that changes all the null values to 1 and not null vlaues
to
0, i
recieve a compile error message. Can someone tell me what I'm doing
wrong?
Expr1: Sum(IIf(IsNull([Processtbl]![Ship_Date]),1,0))