Posted: Tue Oct 24, 2006 5:59 am Post subject: ESQL NULL handling for scalar values?
Apprentice
Joined: 03 Feb 2006 Posts: 33
Hi,
I have a an ESQL CHAR variable which I use to retrieve a value from a database table column - using THE (SELECT T.COL FROM Database.TABLE AS T)
I want to test the returned value for NULL and was using
IF nextCode = NULL THEN...
However, this fails as, according to the ESQL help, “ESQL provides a full set of comparison operators (predicates). Each compares two scalar values and returns a Boolean. If either operand is null the result is null. Otherwise the result is true if the condition is satisfied and false if it is not.”
As such, I get the following in a user trace:
Evaluating expression ''nextCode = NULL'' at ('ie.xxx.ifg.shared.xref.AssignCode', '23.20'). This resolved to ''NULL = NULL''. The result was ''NULL''.
Surely there is some way I can to test the scalar value for NULL? Has anyone any suggestions?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum