[Qgis-user] Query expression bugs with NULL Values

José Carlos Martínez Llario jomarlla at cgf.upv.es
Thu Mar 26 03:51:14 PDT 2015


Thanks for the answer Jürgen, didnt know that QGIS used normal database 
null logic which is fantastic.
Cheers,
Jose


On 26/03/2015 10:53, Jürgen E. Fischer wrote:
> Hi José,
>
> On Thu, 26. Mar 2015 at 10:19:10 +0100, José Carlos Martínez Llario wrote:
>> "amenity"  <>  'restaurant' returns 37 rows
>> "amenity"  =  'restaurant'  returns 11 rows
>>
>> The layers has 48 NULL values, so it means that amenity"  <>
>> 'restaurant' does not take into account the null values.
>> Hope this is a bug and not the correct behaviour.
> It's the correct behaviour.   NULL <> 'restaurant' is NULL, ie. not true.
>
> Use eg. coalesce('amenity','') <> 'restaurant'
>
>
> Jürgen
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
------------------------------
José Carlos Martínez Llario
http://cartosig.upv.es

Producción Cartográfica y SIG.
Dpto. Ingeniería Cartográfica.
Univ. Politécnica de Valencia.
------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150326/1abf4417/attachment.html>


More information about the Qgis-user mailing list