Subject | Odd handling of spaces in WHERE clause? |
---|---|
Author | rjschappe |
Post date | 2004-06-20T09:17:11Z |
I was just testing some queries and to my amazement the following all
returned the same recordset:
I have one record with a single space " " in their Company name
select * from Address where (Company='')
Select * from Address where (Company=' ')
Select * from Address where (Company=' ')
All these queries brought back my single record.... is this normal?
(it is kindof nice not to have to worry about Trimming spaces, but I
don't want to rely on this behavior and then have it back-fire on me
later...)
Thanks,
--Raymond
returned the same recordset:
I have one record with a single space " " in their Company name
select * from Address where (Company='')
Select * from Address where (Company=' ')
Select * from Address where (Company=' ')
All these queries brought back my single record.... is this normal?
(it is kindof nice not to have to worry about Trimming spaces, but I
don't want to rely on this behavior and then have it back-fire on me
later...)
Thanks,
--Raymond