cancel
Showing results for 
Search instead for 
Did you mean: 

Push-down ADD_DAYS() to HANA

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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 ?