on 06-23-2015 1:07 AM
Hi All,
I want to define calculated column for Text attribute.
Say I have Key column "CID" having the values A,B,C. If "CID" is A then Text column should is Apple and IF "B" then BALL.
I have writtem like CASE ("CID", 'A','APPLE','B','BALL','C','CAT').
ITS GIVING INVALID EXPRESSION.
can someone help me plz
Hi Vasu,
The syntax for case statement is
case(column, cmp1,val1, cmp2,val2, ... , default)
I think as you have not given any default value at the end, validation is failing.
Try below expression,
case("CID",'A','APPLE','B','BALL','C','CAT','null')
Regards,
Rashmi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to remove the spaces..Try this code:
CASE("CID",'A','APPLE','B','BALL','C','CAT').
Regards,
Loed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasu,
What is the datatype for CID, IS it string if not then change to string and I assume it should help you.
Cheers
Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasu,
I am basis guy so don't have the syntax, but can you check with below link from help.sap.com
http://help.sap.com/saphelp_hanaplatform/helpdata/en/f5/749abef557488d9a747082e5e390d9/content.htm
http://scn.sap.com/thread/3407399
I assume this can help you. http://scn.sap.com/community/services/blog/2014/03/26/hana-modeling-good-practices - Forum for syntax Let me know if this helps.
cheers
Sharma
Message was edited by: Deepanshu Sharma
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.