jasminewhite
Registered User.
- Local time
- Yesterday, 19:18
- Joined
- Dec 8, 2011
- Messages
- 26
My table:
CHAPTER FIELD1 FIELD2
1 NULL “No Stat”
1 “No Stat” NULL
1 NULL NULL
1 “No Stat” “No Stat”
1 otherVal otherVal
The result that I want:
CHAPTER COUNTfield1 COUNTfield2
1 4 4
I want to select records that contain either NULL or “No Stat” in either FIELD1 OR FIELD2
then Count #rec for any field that has NULL or “No Stat”
The problem is the count function does not count NULL, so I use IIf statement to replace NULL with “No Stat”. I can display those values on the screen correctly, but cannot count these NULL recs together with the “No Stat” recs. Please give me the SELECT statement that does this. Thank you so much.
CHAPTER FIELD1 FIELD2
1 NULL “No Stat”
1 “No Stat” NULL
1 NULL NULL
1 “No Stat” “No Stat”
1 otherVal otherVal
The result that I want:
CHAPTER COUNTfield1 COUNTfield2
1 4 4
I want to select records that contain either NULL or “No Stat” in either FIELD1 OR FIELD2
then Count #rec for any field that has NULL or “No Stat”
The problem is the count function does not count NULL, so I use IIf statement to replace NULL with “No Stat”. I can display those values on the screen correctly, but cannot count these NULL recs together with the “No Stat” recs. Please give me the SELECT statement that does this. Thank you so much.