[Qgis-user] Query expression bugs with NULL Values
Andre Joost
andre+joost at nurfuerspam.de
Wed Mar 25 12:38:34 PDT 2015
Am 25.03.2015 um 20:07 schrieb José Carlos Martínez Llario:
>
>
> The layers has 48 NULL values,
...
> THIS IS OK
> "amenity" is not NULL returns 48
> "amenity" is NULL returns 4587
>
This does not make nuch sense to me. Do you have 48 empty (NULL)
entries, or 48 non-empty values?
> THIS IS WRONG (if null values can not be treated as a text in the syntax
> it shouldnt work in both cases or throw some error)
> "amenity" <> 'NULL' returns 48
> "amenity" = 'NULL' returns 0 ????
No, NULL and 'NULL' are two different things. It is possible to write
'NULL' as a text value for amenity (although it does not make sense, but
the OSM database does not reject it).
So it should be ok that "amenity" = 'NULL' returns nothing in your
dataset.
HTH,
André Joost
More information about the Qgis-user
mailing list