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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NULL and Blank in different INFORMIX Version

Status
Not open for further replies.

ttkong

Programmer
Jun 5, 2002
22
MY
Hi all,

Is anybody know that NULL and bank ("") is considered same value when assigning to a variable in INFORMIX version 5 or older? For example:

LET a = NULL

is equal to

LET a = ""

or

LET a = NULL
LET b = ""

IF a = b THEN # True
....
END IF

From my understanding, INFORMIX 4GL version 7 treats the above differently. That is, NULL <> &quot;&quot;. If the above statement is correct, is there any INFORMIX utility that could make INFORMIX version 7.x accept the 4GL codes previously coded in version 5, without any changes to the code?

Thanks.

Rgrds,
TTKong

 
Hi:

According to everything, i've read about null, the result of this code:

LET a = NULL
LET b = &quot;&quot;

IF a = b THEN # True
....
END IF

is unspecified. For checking for null for equality of inequality. You have to do this:

IF a = b or a IS NULL or b IS NULL THEN
.

Regards,

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top