Subject | Re: [firebird-support] select null with "field <> 'string' " |
---|---|
Author | Martijn Tonies |
Post date | 2003-10-09T11:20:34Z |
Hi Matt,
NULL and NOT NULL
or, translated to normal human language:
Unknown and Known
Empty and Filled
As you might have guessed by now -
You can't do a thing like:
Unknown value <> 'DIS'
but you need to explicitly ask for either values that are known
and different than DIS or unknown values.
MEMO <> 'DIS' OR MEMO IS NULL
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.
Upscene Productions
http://www.upscene.com
> where memo <>'DIS' or memo is null?The reason for this, is that SQL knows two states for a value:
> or another solution
> SELECT col1, col2, col3 where memo <>'DIS'
> union
> SELECT col1, col2, col3 where memo is null
NULL and NOT NULL
or, translated to normal human language:
Unknown and Known
Empty and Filled
As you might have guessed by now -
You can't do a thing like:
Unknown value <> 'DIS'
but you need to explicitly ask for either values that are known
and different than DIS or unknown values.
MEMO <> 'DIS' OR MEMO IS NULL
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.
Upscene Productions
http://www.upscene.com