Re: <No Subject Supplied>
Posted in 1997
Nagesh Daliparthy wrote:
>
> 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.
Generally, NULL has to be tested explicitly, which is well-documented.
For Instance:
SELECT columns FROM table WHERE column IS NULL;or:
... WHERE column IS NOT NULL
To search WHERE NULL in an SQL form, use and equal sign in the field
with nothing after it:
Column:[= ]
^User typed this.
And for NOT NULL:
Column:[!= ]
^^User typed both these.
--
//////////////// =======================================================
////////// // Dennis J. Pimple Informix Software, Inc.
////// / /// Principal Consultant 6300 S Syracuse Way Ste 205
///// // //// dennisp@informix.com Englewood CO 80111
//// // /////
/// // ////// recept: 303-850-0210
// // /////// direct: 303-740-5611 Opinions expressed are mine,
/ /////////// fax: 303-779-4025 and do not necessarily
//////////////// http://www.informix.com reflect those of my employer