Subject | Re: [IBO] Null values problem |
---|---|
Author | Helen Borrie |
Post date | 2003-10-27T04:00:03Z |
At 09:33 PM 26/10/2003 -0600, you wrote:
"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
>I'm using FB 1.5 RC6. I have a field that is usually null. The followingIt's not IBO, it's standard SQL. Null isn't a value, so it can't be
>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.
"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