Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

Push-down ADD_DAYS() to HANA

$
0
0

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


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>