Skip to content
Advertisement

Tag: hana

Calculating checksum in Big Query

I have a query in SAP HANA like below. I am calculating check_sum based on some column in the table Now I have created the same table in Big Query. I want to calculate check_sum in Big Query and get the same result as in SAP HANA I have tried like below It says TO_BINARY function is not available. I

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

Two dimensional comparison in sql

DB schema There are rows with the same cryptid, I need to squash them to one row. So the cryptid becomes effectively unique. The complexity comes from the fact that I need to compare dates by rows as well as by columns. How to implement that? The rule I need to use is: status should be taken from the row

Advertisement