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

Re: max month in quarter using hana sql

$
0
0

Hi

 

can this solve your problem on hand?

 

 

select

 

 

substr('03060912',cast(right(quarter('2014/07/30'),1,2) asdecimal(1,0))*2-1,2) from dummy

 

This would work for any year as last month of quarter is common set irrespective of year.

 

if you get quarter from a source, cast(right(quarter('2014/07/30'),1,2) asdecimal(1,0)), can simply be replace with the quarter column.

kind regards

K Sudhakaran


Viewing all articles
Browse latest Browse all 8491

Trending Articles



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