IsNull (PQL)
Returns True if the value is null otherwise false
- Returned Output: Boolean
- Library: PQL \ Granular \ Logical
- Version: 2023.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
IsNull( <Column Variant> )
* Click on the function's arguments above for more details on the input values.
Comments
- The only argument can be a simple or complex logical statement made up of a column, value, other function that returns a result.
- The function returns true if the result is NULL. This is not the same as zero (0).
- For details on how to employ and use this function see the custom column overview.
Different Function types
- This function is similar to the PQL common function of a similar name. However, it operates on a column directly at the grain.
- As a granular function, it is used in the base SQL query itself.
Example
This example checks if the values of the inner IF statement are null or not. The inner If statement checks i values in the Price column are above 100. If they are it returns "1" otherwise it returns the NULL value.
IsNull( If( [transactions].[Price]>100 , 1 , null ) )
You can see the effect from this example snippet in the IsNull column #8, based on the Price column in position #2.