Subject Re: [firebird-support] select null with "field <> 'string' "
Author Matt Clark
Ah, suddenly it all becomes clear :)
Thanks all

regards mattc

On Thu, 2003-10-09 at 11:20, Martijn Tonies wrote:
> Hi Matt,
>
>
> > where memo <>'DIS' or memo is null?
> > or another solution
> > SELECT col1, col2, col3 where memo <>'DIS'
> > union
> > SELECT col1, col2, col3 where memo is null
>
> The reason for this, is that SQL knows two states for a value:
> 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
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Maplin Electronics Ltd.
www.maplin.co.uk

This message is intended only for the use of the person(s) ("The intended
recipient(s)") to whom it is addressed. It may contain information which is
privileged and confidential within the meaning of applicable law. If you
are not the intended recipient please contact the sender as soon as possible.
The views expressed in this communication may not necessarily be the views
held by Maplin Electronics Ltd.