[QGIS-trac] Re: [Quantum GIS] #2974: Search for NULL value
seemignly not
possible from simple search and not obvious from advanced search
Quantum GIS
qgis at qgis.org
Wed Jan 12 07:25:14 EST 2011
#2974: Search for NULL value seemignly not possible from simple search and not
obvious from advanced search
------------------------------------------------+---------------------------
Reporter: Elgon | Owner: nobody
Type: bug | Status: new
Priority: major: does not work as expected | Milestone: Version 1.6.0
Component: Build/Install | Version:
Keywords: NULL search | Platform_version: Windows 7
Platform: Debian | Must_fix: Yes
Status_info: 0 |
------------------------------------------------+---------------------------
Comment(by wonder):
I disagree with the second suggestion: allowing the syntax "Field = NULL"
would not be correct. We are trying to keep the functionality as close to
SQL standard as possible. SQL uses three-valued logic (true, false,
unknown) and all predicates like "x = NULL" return unknown. Select command
returns only rows where predicate evaluates to true. Therefore "select *
from Table WHERE x = NULL" will always return zero rows. Test for NULL can
be done only by using "x IS NULL".
If the user wants to search for NULL rows, we could allow him to enter
"NULL" as a search text and generate the query as "x IS NULL".
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2974#comment:1>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list