Database view filter for 'is not null'

Jon Wagner
Mega Expert

Hello,
I'm looking for the syntax for how to filter a database view for a field is not null.

Example
&& inc_major_incident_state="rejected"
-If a database view using the incident table had the above filter condition added to the where clause it would return incident records for Major Incident State = "rejected".

My Question
-What is the syntax for Major Incident State is not empty (i.e. Major Incident State is not "None")

1 ACCEPTED SOLUTION

BALAJI40
Mega Sage

Hi,

Have you tried with, inc_major_incident_state != null

View solution in original post

3 REPLIES 3

BALAJI40
Mega Sage

Hi,

Have you tried with, inc_major_incident_state != null

Hey Balaji,

Thanks, this allowed me to arrive at the correct answer. 

Solution:

  • While "inc_major_incident_state != null" did not work, the operator != was what I needed. Since major_incident_state is a field derived from a choice list I used the syntax "inc_major_incident_state!="none" to filter out all the incidents that have "none" as the Major Incident State (as this appears to be the default MI state my OOtB design).

 

amelajones
Kilo Explorer

Well, I dont know the exact solution but you can look for it here.