Skip to Content
avatar image
Former Member

Column Store Error - Nested Ifs in calculated column

Hi,

Please help me on how to handle Column Store error in the use nested-ifs in calculated column - SAP HANA SPS11. I have two set of different conditions based on the POI being less than a year or more than year to set a flag-column. It throws me an error either on 'right parenthesis needed' or 'column store error'. Giving me real hard time, please help and suggest some alternative solutions too...

Calculated column Expression:

IF(INT("POI") >= 365 AND DATE("ITMTO")<= DATE(NOW()) AND (STRING("CLAIMFLAG_FOR_LAPSEDPOLICIES")!='Y'OR STRING( "_BIC_YCBOSTAT") = '001' OR STRING( "_BIC_YCBOSTAT") = '001') AND INT("CLAIM_COUNT_INT")=0,'NCBNEW_FLAG',

(

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")=1),'NCDA1N_FLAG',

IF((INT"CLAIMCOUNT_NCB_ALLOWED_NO_NCD")= 1 ),'NCDA2N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")=1),'NCDP1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")>1),'NCDA2N_FLAG','NCDP3N_FLAG')

)

)

)

)

)

,( IF(INT("POI") < 365 AND DATE("ITMTO")<= DATE(NOW()) AND (STRING( "_BIC_YCBOSTAT") = '001' OR STRING( "_BIC_YCBOSTAT") = '002') AND (INT("CLAIM_COUNT_INT")=0 AND STRING("_BIC_YCNCDRET")='Y'),'SAMEEXISTING_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")=1),'NCDA1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")= 1 ),'NCDA2N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")=1),'NCDP1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")>1),'NCDA2N_FLAG','NCDP3N_FLAG')

)))

)

)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 20, 2016 at 06:14 PM

    Hi Mathura,

    I don't see any issues with the IF. Try to split it into smaller parts (first not nested) that you can test individually.

    Best,

    Marc

    Product Management SAP HANA DW

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes, Marc. I did that. No errors now. Expression is valid, but stil getting run-time error.

      Is it advisable to create scripted calculation view in this case as the logic is complex? Please advice

  • Oct 24, 2016 at 06:21 PM

    If the expression if valid, then it should work. Please create an incident report so SAP support can analyze the issue (see http://support.sap.com/incident).

    Regards,
    Marc
    Product Management SAP HANA DW

    Add comment
    10|10000 characters needed characters exceeded