Multiple conditional null query (1 Viewer)

JMichaelM

Registered User.
Local time
Today, 06:01
Joined
Aug 4, 2016
Messages
101
I forget how to do this query. If i have multiple fields which are not null then i want to result in specific text.

Field 2 null
Field 3 null
Field 4 null
Result A

Field 2 null
Field 3 null
Field 4 not null
""
 

isladogs

MVP / VIP
Local time
Today, 14:01
Joined
Jan 14, 2017
Messages
18,209
I'm sure your field names aren't as listed. What are they really?

Also what's the name of the table and the field to be updated?
 

JMichaelM

Registered User.
Local time
Today, 06:01
Joined
Aug 4, 2016
Messages
101
Its gonna be something like:

IIF ([Valid] Is Not Null and IIF ([Expired] Is Not Null, "Ok" , ""))

All have to be null for one result.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2002
Messages
43,223
There is no need to use IIF(). This is a queyr and the "If" is implied in the Where clause.

@JMichaelM,
If you figured out the answer or someone else provided it, then the generous thing would be to post the solution here so that someone else might find it.
 

Users who are viewing this thread

Top Bottom