Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3548

Re: Need to change cmy sql code to HANA sql code

$
0
0

Hi Naresh,

 

In SAP HANA SQL, to the best of my knowledge there is no support for shifting start day of week (default being start Monday (0) thru Sunday (6)). However you can create a UDF user defined function to incorporate logic of start day shift and use the function in your SQL.

 

Another option I can think of is if Sunday is always start day of the week for your requirements, you can generate time data at week granularity with start day as Sunday

 

Capture.JPG

 

I think best option would be to create a UDF with the start date shift logic and use the function.

 

Link on UDF:

http://scn.sap.com/community/developer-center/hana/blog/2012/12/07/table-user-defined-functions-table-udf-in-hana

 

~Gopal


Viewing all articles
Browse latest Browse all 3548

Trending Articles



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