Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
NULL and Nothing

NULL and Nothing

Ratings: (0)|Views: 1,039|Likes:
Published by Wim Donckers
Qlikview docu
Qlikview docu

More info:

Categories:Topics
Published by: Wim Donckers on Oct 02, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/17/2014

pdf

text

original

 
 
NULL and Nothing
QlikView Technical BriefApr 26, 2013, HICwww.qlikview.com
 
 2
Contents
Contents .............................................................................................................................................. 2
 
Introduction ......................................................................................................................................... 3
 
Different types of Nothingness ............................................................................................................ 3
 
Numerical zero .......................................................................................................................... 3
 
Empty strings and white space ................................................................................................. 4
 
True NULLs .............................................................................................................................. 4
 
Missing values – Type one: Different cardinality of key field .................................................... 4
 
Missing values – Type two: Cross table with incomplete Cartesian product ............................ 5
 
Kleenean logic .................................................................................................................................... 6
 
NULL propagation ............................................................................................................................... 7
 
How does QlikView display NULL? .................................................................................................. 10
 
List box ................................................................................................................................... 10
 
Table box ................................................................................................................................ 10
 
Chart Dimensions ................................................................................................................... 10
 
Chart Expressions – NULLs and missing values of type one ................................................ 11
 
Chart Expressions – Missing values of type two .................................................................... 11
 
Some tips .......................................................................................................................................... 12
 
How to convert empty fields or blank strings to NULL? .......................................................... 12
 
How to display NULLs? .......................................................................................................... 12
 
How to test for NULLs and missing values? ........................................................................... 13
 
How to search and select NULLs or missing values? ...................................................................... 14
 
Using “Select Excluded” ......................................................................................................... 14
 
Using advanced search .......................................................................................................... 15
 
Create a field in the data model that allows selecting excluded values ................................. 16
 
NULLs and missing values in Set analysis ....................................................................................... 17
 
Set operators .......................................................................................................................... 17
 
Implicit field value definitions .................................................................................................. 18
 
 
 3
Introduction
In databases and in QlikView, nothingness is represented by the concept of NULL, i.e. a field valueto show that there is no value assigned to the field in this record. Strictly speaking, NULL is not avalue – it is a lack of value. Although I know this well, I sometimes call it “NULL value” anyway.NULLs have certain basic properties:
All QlikView fields and all data types in a SQL database are NULL-able.
In SQL, NULL does not have a data type. In QlikView, this corresponds to the fact thatNULLs are not dual, i.e. they do not have both a string representation and a numericrepresentation.
NULLs propagate. If you use a NULL in an expression, it will not cause an error. Rather, itwill propagate through the expression and yield a result which often – but not always – isNULL.
NULLs cannot be used as key value to join or link tables.
NULLs are neither visible nor clickable in QlikView list boxes, unless you make them visibleand clickable using a method described below. This means that NULLs are not selectablein QlikView.A consequence of the above is that if you select all values in list box, you will get a different resultin other list boxes than if you select no values.The reason for this is that the first case excludes records with NULLs, which could mean that youexclude real values in other fields that potentially are used in calculations.But there are also other types of nothingness…
Different types of Nothingness
NULL is not the only way to describe nothingness in QlikView. There are many other cases ofnothingness, some which should not be confused with NULL:
Numerical zero
If a field has a numerical zero in it – 0 – then this of course represents a numerical nothingness, butit is certainly not the same as NULL. The field
has 
a value and is hence not NULL. The IsNull()function will return FALSE and the record will be included in the calculation of both Avg() andCount().

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->