Re: SELECT WHERE NOT, is not working

From: MargaretGillon(at)chromalloy(dot)com
To: Ragnar Hafstað <gnari(at)simnet(dot)is>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT WHERE NOT, is not working
Date: 2005-01-05 22:51:12
Message-ID: OF0B7A3673.2F150A87-ON88256F80.007D2A9C-88256F80.007CEDD7@CHROMALLOY.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks, Ragnar,

You are right in what is happening. The code was supposed to be sending ''
but it is sending NULL instead. I see now -- in PostgreSQL to look for any
record without the 'X' I have to use a combined condition because a NULL is
not included in a != statement.

select count(*) from resource where reengine is NULL or NOT (reengine =
'X') ;

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
***
Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2005-01-05 22:59:34 Re: SELECT WHERE NOT, is not working
Previous Message Tom Lane 2005-01-05 22:44:45 Re: SELECT WHERE NOT, is not working