gojets1721
Registered User.
- Local time
- Today, 10:31
- Joined
- Jun 11, 2019
- Messages
- 430
I have two update queries that update two fields in the same table to 'N/A' if the respective field is null.
Here they are:
Query 1:
Query 2:
For simplicity, it'd be nice to just combine these into one update query but idk if that's possible. I tried the below but it only updates the fields if both are null.
I then tried below but this one updates both even if only one of them is null.
Maybe it's just not possible. Curious your thoughts tho. Thanks!
Here they are:
Query 1:
Code:
UPDATE tblComplaints SET Location = "N/A"
WHERE Location Is Null;
Query 2:
Code:
UPDATE tblComplaints SET Category = "N/A"
WHERE Category Is Null;
For simplicity, it'd be nice to just combine these into one update query but idk if that's possible. I tried the below but it only updates the fields if both are null.
Code:
UPDATE tblComplaints SET Location = "N/A", Category = "N/A"
WHERE Location Is Null AND Category Is Null;
I then tried below but this one updates both even if only one of them is null.
Code:
UPDATE tblComplaints SET Location = "N/A", Category = "N/A"
WHERE Location Is Null OR Category Is Null;
Maybe it's just not possible. Curious your thoughts tho. Thanks!