Forum Discussion
Set up query to find missing data in multiple fields
- Jun 17, 2021
We could be more precise with more details to work with, but the general pattern would be:
SELECT FirstName, LastName, DateofBirth, PhoneNumber
FROM tblYourTableNameGoesHere
WHERE FirstName Is Null OR LastName Is Null OR DateOfBirth Is Null OR PhoneNumber Is Null
However, it is possible that one or more of them is actually a Zero Length String (ZLS) so I'd write that to cover that possibility:
SELECT FirstName, LastName, DateofBirth, PhoneNumber
FROM tblYourTableNameGoesHere
WHERE Len(FirstName & "") = 0 OR Len(LastName & "") = 0 OR DateOfBirth Is Null OR Len(PhoneNumber & "") = 0
The date field will be null or have a valid date.
Is that what you tried before?
We could be more precise with more details to work with, but the general pattern would be:
SELECT FirstName, LastName, DateofBirth, PhoneNumber
FROM tblYourTableNameGoesHere
WHERE FirstName Is Null OR LastName Is Null OR DateOfBirth Is Null OR PhoneNumber Is Null
However, it is possible that one or more of them is actually a Zero Length String (ZLS) so I'd write that to cover that possibility:
SELECT FirstName, LastName, DateofBirth, PhoneNumber
FROM tblYourTableNameGoesHere
WHERE Len(FirstName & "") = 0 OR Len(LastName & "") = 0 OR DateOfBirth Is Null OR Len(PhoneNumber & "") = 0
The date field will be null or have a valid date.
Is that what you tried before?