/
coalesceEmpty
coalesceEmpty
Apply a specified value to empty cells in a specified table column. If a cell has a value, the same value is returned.
Usage Details
LQL Command
select *, coalesceEmpty(column, param) as returnValue from tableName -- column: column name to check if it is empty -- param: if column is empty return param value -- tableName: name of a table -- returnValue: if column value is not empty columns value is returned, otherwise param value will be returned
Example
Input
table
id | destIP |
---|---|
1 | |
2 | 1.1.1.1 |
LQL command
select *, coalesceEmpty(destIP, '192.68.23.1') as newDestIP from table
Output
id | destIP | newDestIP | |
---|---|---|---|
1 | 192.68.23.1 | ||
2 | 1.1.1.1 | 1.1.1.1 |
, multiple selections available,
Related content
CoalesceColumns
CoalesceColumns
More like this
Null value locator (nvl)
Null value locator (nvl)
More like this
Null value locator (nvl)
Null value locator (nvl)
More like this
Is not null (isnotnull)
Is not null (isnotnull)
More like this