Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NULL vs string comparison in Informix 9.3

Status
Not open for further replies.

jkol

Programmer
Aug 25, 2003
1
US
We are trying to migrate from Informix 7.x to 9.3 and found one issue with our existing sql code.

Following sql code retrieves multiple rows from the database in 7.x

select tabname from systables
where tabid in
(select tabid from syssyntable
where owner != "informix" and dbname != "ppcdds023")

whereas the same code retrieves no rows in 9.3 with the same table entries.

Currently the value of dbname in syssyntable is null in our database.
Should the above yield the same results in 9.3 also since "ppcdds023" is not equal to null??

 
Hi,

First check for the number of rows returned by the inner sql statement:

select tabid from syssyntable
where owner != "informix" and dbname != "ppcdds023" ;

If it does not you know the obvious; sub-query is not sending any row to the first (outer) select statement.

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top