on 05-05-2017 9:34 AM
Hi Expert,
I am facing a issue in hana for calculated column whose datatype assigned is NVARCHAR(30),I am concatenating date at the end with other value.
After Concatenating the value is becoming more than 30 but their is no error coming while doing data preview.
e.g:
SRCDOC_ID= ORIGINALDOC_ID+SRC_TS, where ORIGINALDOCID='1831858076201021234WDevice1' and SRC_TS='20170405'
in data preview i am getting the value as SRCDOC_ID='1831858076201WDevice12017-04-05'
Please Help me about how its coming like this
Thanks
Saurabh Agarwal
This is seems to be know issue/solution where we see we define the length of the columns to be of specific length but the calculation view returns the complete value without mentioning any errors or warnings.
The issue becomes more visible, when we try to consume this view in BO or we use this in the data loading procedures where the length of the column is defined in synch with the length of the column in view . And the data loading fails due to maximum length violation error.
Would like to know if this is a known thing or if there are any enhancements coming to fix this. It would really help us a lot
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We have also faced similar issue, it occurred only while processing huge number of records. We have realized that there is a mismatch in the result length and the length defined for the column. Only after increasing the field length, we could resolve the issue.
Regards
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The data will not be truncated in case the length you defined in the calculated column is less than the length of the data.
The data shall be properly shown to the user after calculation without any loss or error.
Thus, as in your case even though the length is 30, we see the concatenation result correctly.
Thank you.
Best Regards,
Anjali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In HANA date format is YYYY-MM-DD instead of YYYYMMD (as in ABAP). I assume SRC_TS is declared as DATE. In case you want result as '1831858076201WDevice120170405' instead of '1831858076201WDevice12017-04-05', try below -
SRCDOC_ID= "ORIGINALDOC_ID" + replace(string("SRC_TS"),'-','')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.