on 09-15-2015 2:37 PM
Hi,
With Data Services I want to push-down a SQL statement to HANA that gives the next Monday for a given date. This should be easy by using day_in_week() and adding the days necessary to get to Monday.
The function day_in_week() will push-down, but the problem is, the add days does not push-down. In DS I used date + n days and this produced a full push-down 'INSERT...SELECT' statement but when it runs you get a HANA general error on the expression "POSITION"."START_DATE" + 2:
SQL submitted to database <> resulted in error <[SAP AG][LIBODBCHDB DLL][HDBODBC] General error;266 inconsistent datatype: the expression has incomputable datatype: TIMESTAMP is invalid for addition operator: line 86 col 6 (at pos 8444)>.
1) Is this a bug? It's strange that DS thinks this can be pushed-down but the SQL is actually invalid. It should be possible to push-down as HANA has the ADD_DAYS(date, n days) function.
2) Is there a work around for adding days or another way to get the next Monday with push-down to HANA?
We're using:
DS - 14.2.1.622
HANA - 1.00.85
Thanks
Dan
if date + 2 is not a correct syntax for date arithmetic for HANA then it should not be pushed down, looks like a bug to me
since you are on DS 4.2 SP01 Patch, may be it's fixed in later version do you have higer DS version ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.