When writing queries in Data 360's Query Editor, it is important to correctly handle fields that may contain NULL (missing or unknown) values.
The Query Editor uses SQL syntax (not SOQL), and SQL treats NULL differently than normal values.
In SQL, any direct comparison like Some_Field = NULL does not return expected results because it evaluates to UNKNOWN instead of TRUE.
To properly filter records where a field is NULL, you must use:
WHERE Some_Field IS NULL
Similarly, to find records where a field has any value (is not null):
WHERE Some_Field IS NOT NULL
Understanding and applying the correct NULL handling ensures accurate and reliable results when querying data in Data 360.
Do not use = NULL to filter for NULL values in Query Editor.
Always use IS NULL to find records where a field is NULL.
Use IS NOT NULL to find records where a field contains any non-NULL value.
This aligns with standard SQL behavior based on three-valued logic (TRUE, FALSE, UNKNOWN). Only conditions that evaluate to TRUE are returned in query results.
Example:
| Query | Behavior |
|---|---|
WHERE Some_Field = NULL | Returns no rows (condition evaluates to UNKNOWN) |
WHERE Some_Field IS NULL | Returns rows where Some_Field is NULL |
WHERE Some_Field IS NOT NULL | Returns rows where Some_Field has a value |
004695584

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.