DENULLIFY
Syntax
DENULLIFY(<any>; <any>)
Description
Converts null values (represented by ω) to non-null default values. All non-null values are left untouched.
Integer null values are converted to 0 (zero), float values are converted to 0.0, string null values are converted to empty strings, Boolean values are converted to false, and null date values are converted to Jan 1, 1970 12:00:00 AM.
An additional argument can be entered into DENULLIFY as a default replacement to null values.
Examples
Example 1
=DENULLIFY(#Column1)
Data field type | Column1 | DENULLIFY returns |
---|---|---|
Integer | 1 | 1 |
Integer | null (ω) | 0 |
Integer | 3 | 3 |
Float | 1.1 | 1.1 |
Float | null (ω) | 0.0 |
Float | 2.2 | 2.2 |
Date | Sep 19, 2008 11:13:27 AM | Sep, 19 2008 11:13:27 AM |
Date | null (ω) | Jan, 01 1970 12:00:00 AM |
Date | Nov, 25 2010 11:56:13 AM | Nov, 25 2010 11:56:13 AM |
String | "test1" | “test1" |
String | null (ω) | "" (an empty string) |
String | "test3" | "test3" |
Boolean | true | true |
Boolean | null (ω) | false |
Boolean | false | false |
List (as of Datameer X v5.2) | null | [ ] (empty list) |
List (as of Datameer X v5.2) | [1,2,3] | [1,2,3] |
Example 2
=DENULLIFY(#Column1;"123456789")
Data Field Type | Column1 | Returns |
---|---|---|
Integer | null (ω) | 123456789 |