cancel
Showing results for 
Search instead for 
Did you mean: 

NOT ISNULL

Former Member
0 Kudos

if not(isnull({Z_RRS_EAOR_CT.RESN_AT_FLG})) then 1 else 0

Above is my crystal Syntax, How can I use Not in the Universe Object.

For NULL I use Case when isnull ( Z_RRS_EAOR_CT.RESN_AT_FLG,'NULL') = 'NULL' THEN 1 ELSE 0 end

so where can I add the "NOT" in the universe object

_________________

Thanks alot

Reddy

Accepted Solutions (1)

Accepted Solutions (1)

MariannevL
Advisor
Advisor
0 Kudos

Hi Reddy,

It depends on your RDBMS, for oracle use;

CASE WHEN NOT (Z_RRS_EAOR_CT.RESN_AT_FLG IS NULL) THEN 1 ELSE 0 END

or

CASE WHEN Z_RRS_EAOR_CT.RESN_AT_FLG IS NULL THEN 0 ELSE 1 END

or more old fashioned

DECODE(Z_RRS_EAOR_CT.RESN_AT_FLG,NULL,0,1)

I guess any RDBMS will use NOT as a simple negation of a boolean,

that means any condition will result in a boolean, which can be negated (true-->false and the other way around).

So just bracket it like you did in the crystal variable.

Good luck,

Marianne

Answers (1)

Answers (1)

Former Member
0 Kudos

CASE WHEN arg1 IS NOT NULL THEN arg2 ELSE arg3 END

got solution from BOB. Thanks again pablolee