Skip to Content
0
Former Member
Apr 14, 2014 at 06:54 AM

Errow with IF statement in Scripted Calculation view

51 Views

Hi Team,

I am trying to use IF statement in Scripted Calculation view.

My scenario is:-

I need to create a restricted Key figure based on input date from user.

While i am activating my view system gives "Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: transaction rolled back by an internal error: Syntax Error for calculated Attribute: line 29 col 9 (at pos 1501)" error.


Below is the code i have used in my CV.

CE_CALC('IF((to_int("BUDAT") >= to_int(2013-01-01),"AMOUNT",'''')', DECIMAL(13,2)) AS "DTR"

Here, "AMOUNT" is another calculated field created using CE_CALC.

Without above IF statement my CV runs perfectly fine. The moment i include IF statement it does not activate.

Kindly provide your inputs.

Thanks & Regards,

Anup