Loading

Data 360: Understanding NULL Handling in Data C360 Query Editor

Publiseringsdato: Dec 3, 2025
Beskrivelse

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.

Løsning
  • 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:

QueryBehavior
WHERE Some_Field = NULLReturns no rows (condition evaluates to UNKNOWN)
WHERE Some_Field IS NULLReturns rows where Some_Field is NULL
WHERE Some_Field IS NOT NULLReturns rows where Some_Field has a value

 

Knowledge-artikkelnummer

004695584

 
Laster
Salesforce Help | Article