Selecting rows without a value for Date/Time columns
I'm running this query:
开发者_如何学运维SELECT TOP 1 [DVD Copy].[Stock No]
FROM [DVD Copy]
WHERE [DVD Copy].[Catalogue No] =[Forms]![New Rental]![Catalogue No]
And [Issue Date] = Null;
Which works fine without the null check for Issue Date. I'm trying to select rows without a Date in the Issue Date column. Is Null the wrong kind of value to use for here?
If I remember access correctly, you can write:
and not isNull([Issue Date])
or write:
and [issue Date] is not null
instead of comparing to Null, because nothing equals null. (It's a weird paradox...)
On the subject of Nulls in Access (and in general) these articles by Access guru Allen Browne are unmatched in explaining things clearly:
- Nulls: Do I need them?
- Common Errors with Null
精彩评论