Skip to content

Tag: hana

Select with update statement sap hana

I’m trying to combine select and update in one statement In select I’m trying to find what is the current Fiscal year fiscal period based on table “month_dim” and by using current date. its …

Rolling 12 month filter criteria in SQL

Having an issue in SQL script where I’m trying to achieve filter criteria of rolling 12 months in the day column which stored data as a text in server. Goal is to count sizes for product at retail store location over the last 12 months from the current day. Currently, in my query I’m using the criteria …

SQL View Select Optional

I have a view that the current output something like this The rules are as follows Each group can only have 2 code and always have a default code vs not a default code. IF default code is not null, then always show the row. Regardless if Non default code has value or not If default code is null, then

Hana SQL Logic needed

select groupid,count(value) as x from test_distinct_count group by rollup (groupid); This query gives output like : What i need is to display the value 5 for all the groupids in a column say Total. …