Skip to content
Advertisement

Tag: hana

SQL group and condition sum in the last row

I have several items which belongs to different group, some are unknown group. I need the sum of each group by date. I just try below SQL but still not exactly what I want: DB: SAP HANA Data: Item PG NET_VALUE_USD EMANAGER_DATE 1 1 100 2021-09 2 1 200 2021-10 3 2 300 2021-09 4 2 400 2021-09 5 3

Drop partition if exists in HANA

I would like to know if there is a way to DROP a partition IF EXISTS in HANA. I have tried like below I am getting incorrect syntax error near IF What is the best available solution? Answer HANA does not support the IF EXISTS clause. You may want to work around this limitation by implementing your own “IF EXISTS”,

Disregard duplicate rows only when these rows are contiguous

I am trying to show only the first occurrence of an activity if this activity occurs multiple times in a row. Thus, in the scenario below, if activity B occurs 3 times in a row, even if it is at different times, I want to only select the first occurrence. If it occurs again AFTER another activity I also want

can I place a sql query in a sql hana place holder

can I place a sql query in a sql hana place holder? the following query works: I am trying to pass something like the following: Currently getting a syntex error Answer As error says you, expressions are not supported for column view parameter: Can’t use column expression as column view parameter. However, there are options to calculate it: If your

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 …

Calculated query with parameters in HANA/CrystalReports

I’m having trouble trying to explain my necessity, so I’ll describe the scenario. Scenario: Product A has a maximum production of 125KG at a time. The operator received a production order of 1027,5KG of product A. The operator have to calculate how many rounds he’ll have to manufacture and adjust the components quantity for each round. We want to create

Advertisement