Re: SELECT WHERE NOT, is not working - Mailing list pgsql-general

From Tom Lane
Subject Re: SELECT WHERE NOT, is not working
Date
Msg-id 1879.1104965085@sss.pgh.pa.us
Whole thread Raw
In response to SELECT WHERE NOT, is not working  (MargaretGillon@chromalloy.com)
List pgsql-general
MargaretGillon@chromalloy.com writes:
> I have a small table in which I have a Character(1) field called reengine.
> The field either has an "X" or is empty. This field does not have NULL
> values. There are 27 records in the table, 25 are marked with an 'X' in
> reengine.

> When I write
> select count(*) from resource where reengine = 'X';
> the result is 25

> when I write
> select count(*) from resource where NOT (reengine = 'X');
> the result is zero even though there are two records without the 'X'.

I don't think I believe your statement that those records don't have
NULL values.

            regards, tom lane

pgsql-general by date:

Previous
From: MargaretGillon@chromalloy.com
Date:
Subject: Re: SELECT WHERE NOT, is not working
Next
From: Steve Crawford
Date:
Subject: Re: SELECT WHERE NOT, is not working