Subject RE: [ib-support] Null values in where clause
Author Wilson, Fred
Null is a "state", not a "value" ;)
So, this means that you can't test the equality (or non-equality) of a NULL
column...
NULL = NULL is not true, etc.
You have to use IS NULL, or IS NOT NULL, such as:
where Street_Name IS NULL (or where Street_Name IS NOT NULL), for example

Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>


-----Original Message-----
From: Alexander Tabakov [mailto:saho@...]
Sent: Tuesday, April 08, 2003 9:47 AM
To: German Terrazas Angulo
Subject: [ib-support] Null values in where clause


Hi,

I have a table:

tbl_address
===========
street_name, street_no, block, entrance, floor, flat

Any field can be "null".

When i try a select statement like this:

select *
from tbl_address
where
(street_name=:street_name) and (street_no=:street_no) and .... etc.

in case any of the fields is "null" nothing is selected even when I pass
null value to its parameter.

I understand that this is how things are meant to be, but can you
suggest something to overcome this issue

--
Best regards,
Alexander mailto:saho@...



Yahoo! Groups Sponsor

<http://us.ard.yahoo.com/M=249982.3083889.4452939.1728375/D=egroupweb/S=1705
115386:HM/A=1524963/R=0/*http://hits.411web.com/cgi-bin/autoredir?camp=556&l
lineid=3083889&prop=egroupweb&pos=HM>

<http://us.adserver.yahoo.com/l?M=249982.3083889.4452939.1728375/D=egroupmai
l/S=:HM/A=1524963/rand=861092564>

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]