Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to put sql statements so that I can use it in a Calculation view?

$
0
0

Hi,

 

I have few DML STATEMENTS THAT I WOULD LIKE TO RUN VIA A PROCEDURE SO THAT I CAN USE IT AS AN INPUT INA CALVIEW, HOW WOULD I IMPLEMENT IT.

 

mY SQL STATEMENT IS

 

 

UPDATE "AVG_DIM" SET "MONTH" = MONTH(TO_DATE("ZDATE",'YYYYMMDD'));

 

 

UPDATE "AVG_DIM" SET

"YTD" = case when month(current_date) >= "MONTH"

       then 'Y' else 'N' end,

       "LASTTHREEMONTH" = case when month(current_date)-3 >= "MONTH"

       then 'N' else 'Y' end,

       "LASTMONTH" = case when month(current_date)-1 = "MONTH"

then 'Y' else 'N' end,

"LASTSIXMONTH" = case when month(current_date)-6 >= "MONTH"

then 'N' else 'Y' end;


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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