Subject Re: [IBO] Null values problem
Author Helen Borrie
At 09:33 PM 26/10/2003 -0600, you wrote:
>I'm using FB 1.5 RC6. I have a field that is usually null. The following
>query does not work:
>
>Select *
>from table
>where
> field1 = somevalue
> and fieldNull <> 'EX'
>
>I have to do the following to make it work
>
>Select *
>from table
>where
> field1 = somevalue
> and (fieldNull <> 'EX' or fieldNull is not null)
>
>Why doesn't the first query work? Null <> 'EX' so it should.

It's not IBO, it's standard SQL. Null isn't a value, so it can't be
"equal" or "not equal" to anything, not even null. If you want to include
or exclude null in a search condition, you always have to do so
specifically, using "is [not] null".

Helen