Hi Chris,

I'm a bit confused: I just stated, that I use a filter !='xyz', but not
only these rows are ommited, but also those with NULL values.
I do not try to filter for NULL, I just want the query to NOT filter
them out.

So what I can do to keep the NULLs and just get rid of the xyz?

Cheers,

Bernd

On 15.10.20 16:56, chris hermansen wrote:
Bernd and list,

On Thu, Oct 15, 2020 at 5:18 AM Bernd Vogelgesang <bernd.vogelges...@gmx.de>
wrote:

Hi,

just hit a problem when working with a table from an .ods file.

To work with the data, I have to exclude some values from a field, where
some entries also have NULL values.

When I now filter on the value I do not need ("field" != 'xyz'), also
the rows with  NULL values in that field are filtered out, which is not
what I want.

In databases that support NULL values it's customary to use "IS NULL"
rather than "= NULL".   The rationale is that a boolean expression
involving NULL values can't be true nor false since the meaning of NULL is
"unknown".


As I do not want to "invent" data for those rows just to make it work, I
wonder if this is a bug or if there is a workaround for this problem.

I just tried this with the QGIS select calculator (IS NULL) and it seems to
work fine there.




_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to