cancel
Showing results for 
Search instead for 
Did you mean: 

if statement in CE function

Former Member
0 Kudos

Hi,

When we use IF in calculation view with CE function the SQL engine is used.

When we remove the "IF" the  CE engine is used.

Is there any alternative for if or case in CE functions?

Thanks,

Amir

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Is it possible to use CE_CALC for this functionality?

We are trying to use it inside projection:

res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" ,  "Bal_Date" AS "BALANCE_DATE",   "RTCUR" ,"MAX_ZGROUP"],'"BALANCE_DATE" == 20140101');

works but:

res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" ,  "Bal_Date" AS "BALANCE_DATE",   "RTCUR" ,"MAX_ZGROUP"], '"BALANCE_DATE" == CE_CALC( 'if(''20140101'' == ''19000101'', ''19000101'', ''20140101'')');

Doesn't work.

Thanks,

Amir

former_member182302
Active Contributor
0 Kudos

Did you try using CE_CALC separately after projection and then using one more projection to filter on the new column ( calculated ) ?

Regards,

Krishna Tangudu