On Wednesday 05 January 2005 2:51 pm, [EMAIL PROTECTED] 
wrote:
> 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') ;

Or use the coalesce statement (picks the first non-null argument):
select count(*) from resource where coalesce(reengine, '') != 'X';

Cheers,
Steve


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to