On Mon, Oct 24, 2011 at 6:46 PM, Martin Dobias <[email protected]> wrote: > On Mon, Oct 24, 2011 at 12:34 PM, Giovanni Manghi > <[email protected]> wrote: >> Hi all, >> >> in a shapefile is I try to select all the records with a NULL value >> >> [field]= 'NULL' >> >> QGIS select instead the ones with value = 0. >> >> Is this expected? > > Giovanni, > > the NULL value is a special one - in your example above you are > actually searching for string 'NULL'. The correct expression would be: > myfield IS NULL > > btw. In current development version (i.e. post 1.7) there is improved > support for NULL values and generally three-value logic > (true/false/unknown) as used in SQL. So some expressions that involve > null values may give different outcomes. > > Regards > Martin > _______________________________________________ > Qgis-developer mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-developer >
Hello Giovanni, I'm also a bit confused. I tested your problem but couldn't reproduce that at least with 1.7.1. But what I found out is that there is some weirdness in handling NULL values in shapefiles in QGIS and OGR. I send other post to the list concerning that. -Lauri Kajan _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
