跳到主要内容

NULL- 脚本和图表函数

Null 函数用于返回 NULL 值。

语法:  

Null( )

示例: Load script

In this example, an inline table with four rows is loaded, where the first three lines contain either nothing, - or 'NULL' in the Value column. We want to convert these values to true NULL value representations.

The middle preceding LOAD performs the conversion using the Null function.

The first preceding LOAD adds a field checking if the value is NULL, just for illustration purposes in this example.

NullsDetectedAndConverted: LOAD *, If(IsNull(ValueNullConv), 'T', 'F') as IsItNull; LOAD *, If(len(trim(Value))= 0 or Value='NULL' or Value='-', Null(), Value ) as ValueNullConv; LOAD * Inline [ID, Value 0, 1,NULL 2,- 3,Value];

This is the resulting table. In the ValueNullConv column, the NULL values are represented by -.

Example 1
ID Value ValueNullConv

IsItNull

0 - - T
1 NULL - T
2 - - T
3 Value Value F

本页面有帮助吗?

如果您发现此页面或其内容有任何问题 – 打字错误、遗漏步骤或技术错误 – 请告诉我们!

加入分析现代化计划

Remove banner from view

使用分析现代化计划实现现代化,同时不损害您宝贵的 QlikView 应用程序。 单击此处 了解更多信息或联系: ampquestions@qlik.com