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

Re: SQL statement to derive Year and Month

$
0
0

Hi Kris,

 

What is your use case for this need?

 

If it's for reporting, I'd recommend the following:

 

1) Generate time data in HANA and then join to your table. From time dimension you have pretty much any column you could ever needed related to time-based reporting. The doc should describe required steps: Generate Time Data in SAP HANA - Part 1

 

2) If this is a one-off use case and absolute maximum performance is required, you might consider physically storing date components in their own columns rather than on-the-fly calculation. Here's a semi-relevant discussion on how to accomplish this concept with generated columns: Dynamically calculated columns on HANA tables

 

Cheers,

Jody


Viewing all articles
Browse latest Browse all 8667

Trending Articles



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