Re: SQL Problem
Posted in 1997
Topics: Data Types & Schema Design
Praveen,
In INFORMIX we can not compare a NULL to any other value including a NULL.
.
When you are executing the second SQL, since there is no data, the engine
might be treating the data as NULL and hence you did not get any data. But
when you inserted a space which is not a NULL value the engine is able to
compare and get you the results.
Nagesh
praveen_mohanan@hotmail.com
Friday December 12, 1997 10:21 AM
Please respond to praveen_mohanan@hotmail.com
To: informix-list@rmy.emory.edu
cc: (bcc: Nagesh Daliparthy/PI/Prudential)
Subject: SQL Problem
Hi folks,
There is a small sql problem I faced.
I created a table with one column
create table abc
(
col_name varchar(8) NOT NULL
); After this I didn't do any kind of transaction against this table.
So, my next sql statement was
select a.column
from table a, abc b
where a.col_name != b.col_name; This didn't give any result.
So i changed this to :
select a.column
from table a, abc b
where a.col_name = b.col_name;And Lo!! no results....!!!!!!!
Finally i inserted a space in the table abc.
And both the sql's started working.
ANY COMMENTS....
REgards
Praveen
Sunnyvale, CA
e-mail praveen_mohanan@hotmail.com
tel no : 650.594.9899 X 217
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com