Skip to Content
0
Feb 12, 2012 at 12:05 AM

ISNULL function in SQL Script

7561 Views

Hi,

I am facing a problem when dealing with NULL values.

I have the folloging line in a proyection

CE_CALC('IF( ISNULL("CRITERIA"), 1, 2 )', DECIMAL(15,2) ) AS "VALUE"

When CRITERIA is not null, the expression value is 2 (as expected), but, when CRITERIA is null, the expression is null also. Is not 1 as expected.

Am I using ISNULL funciton properly??

thansk for the help.

Mauricio