Subject | Re: [firebird-support] select null with "field <> 'string' " |
---|---|
Author | Helen Borrie |
Post date | 2003-10-09T11:25:44Z |
At 12:08 PM 9/10/2003 +0000, you wrote:
Use
"where memo is null or memo <> 'DIS' "
STATE test non-equivalence test compares values
NB. "memo = null" and "memo <> null" are not valid predicates.
H.
>Hello all,Null is a state not a value!! (Tattoo this on the back of your hands).
>I'm trying to do a select which should pick up all records where a memo
>field is not equal to the value 'DIS'. The problem I am finding when I
>use "where memo <> 'DIS'" is that a record with memo=<null> is not
>returned! This is a problem since null is the default value for this
>field and I need to return those records.
>Why is null apparently not regarded as <> 'DIS' and what can I do about
>it?
>I'm on linux with a version of firebird around 1.0.0.
Use
"where memo is null or memo <> 'DIS' "
STATE test non-equivalence test compares values
NB. "memo = null" and "memo <> null" are not valid predicates.
H.