跳到主要內容

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