cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

query filter on null/undefined values?

tbone7281
5-Regular Member

query filter on null/undefined values?

I'm trying to create a query with filters based around some dates but I'm not clear on how I can create a filter where I know a value might be null/undefined.

 

For my example, I have startDate and endDate in a data table.  Start is always defined.  End might be defined or might not be.  (If there is an end date, the record expires;  if not, it lasts forever.)

 

So generically, my query needs to be something like:
if startDate <= currentdate AND (endDate > currentDate OR endDate is null)

 

However, I can't figure out a way to accomplish the null/undefined check.  I've a tried a few things, but none of them remotely worked.  (Combinations of EQ, LIKE, null, undefined, "", etc.)

 

Any ideas?  It doesn't seem like this should be that hard...

 

Thanks,

Tony

ACCEPTED SOLUTION

Accepted Solutions
tbone7281
5-Regular Member
(To:tbone7281)

Figured it out:  the trick is to use the type of "MissingValue" in the filter and then not even use value.

View solution in original post

1 REPLY 1
tbone7281
5-Regular Member
(To:tbone7281)

Figured it out:  the trick is to use the type of "MissingValue" in the filter and then not even use value.

Announcements


Top Tags