-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, Oct 23, 2001 at 11:46:41AM -0600, Sterin, Ilya wrote:
> Exactly why I am even having this issue. I can ofcourse switch to using one
> space, though varchar will still trim it. This is an annoying standard I
> must say:-)
>
> You are correct null represents the non existance of value, but in this case
> we are not making it equal to anything, but are rather using the comparison
> = to check for NULL. As we can do in many programming languages. Since SQL
> uses = sign for assignments and comparisons, I don't see a reason for it not
> to be able to check for an absense of value through foo=NULL. But this is
> an ANSI SQL issue and is now getting OT, so maybe if I have the time, I'll
> bother that list to get a clear explanation and why is this implemented in
> this way.
NULL isn't like undef in Perl. NULL is a logical state, not a value. Thus is
doesn't cooperate with logical comparison operators.
As someone else stated, NULL could mean "declined to answer", so you can't
definitively say what someone *would* have answered to say that one NULL =
another NULL. And if someone actually answered nothing (''), that isn't NULL
(unless you're on Oracle -- I can hear the groaning already).
- --
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBO9cEegOGqGs0PadnEQIQJwCfX5L0nUOkCAm1LM4iUBUI+XMisU8An3Y/
oSrUUNY/5ACG1bQodTxvUY9V
=wyk+
-----END PGP SIGNATURE-----