Subject | Null values in where clause |
---|---|
Author | Alexander Tabakov |
Post date | 2003-04-08T16:47Z |
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@...
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@...