Comparing cursor with null values to Dev2k Forms control [message #77841] |
Sat, 01 December 2001 18:07  |
Mark Johnson
Messages: 5 Registered: August 1999
|
Junior Member |
|
|
I have a procedure used to compare certain values to form controls. However, if the value in the cursor row is NULL, then no comparison seems to be done against the Dev2k Forms control. If the row value is not null, it will always perform a comparison though. My code essentially is basically like this:
IF :blk.fld != somerow.fld THEN...
Is there any simple way around this?
----------------------------------------------------------------------
|
|
|
Re: Comparing cursor with null values to Dev2k Forms control [message #77847 is a reply to message #77841] |
Mon, 03 December 2001 22:39   |
Seethalakshmi
Messages: 1 Registered: December 2001
|
Junior Member |
|
|
Mark,
Null cannot be compared. If it is compared it'll always return the boolean value False.
Use
IF :blk.fld != NVL(somerow.fld,'###') THEN...
NVL is used to replace NULL value with some other value to make the comparison work. When somerow.fld is NULL, then that will be replaced with ###(you can give any non-existing value).
Regards
Seetha
----------------------------------------------------------------------
|
|
|
|