hana

R Pass required variable from ODBC/HANA connection to sql statement

∥☆過路亽.° 提交于 2020-01-24 22:05:39
问题 I have a table I am trying to call with my usual method sql <- 'SELECT TOP 10 * FROM "_SYS_BIC"."data-path.self-service.DOIP/table_name"' df <- dbGetQuery(jdbcConnection, sql) and receive the error Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", : Unable to retrieve JDBC result set for SELECT TOP 10 * FROM "_SYS_BIC"."data-path.self-service.DOIP/table_name" (SAP DBTech JDBC: [2048]: column store error: search table error: [34023] Instantiation of calculation model

Set input parameters from the data in on CV as input parameters in other CV in HANA

风格不统一 提交于 2020-01-16 19:57:47
问题 I have a SAP HANA studio Calculated view configuration query I have created a Calculated view (IP) to calculate my input parameters. The input parameters is a row in IP and I want use data in IP as my input parameter for Main Calculated view "AB" Can someone explain how it can be done in Edit Input Parameter window so that My view AB directly fetches value from IP? Also IP has only one row. Do I need to push the data from Input Parameter CV to a table and then use Input Parameter Type =

IF EXISTS statement alternative in HANA

[亡魂溺海] 提交于 2020-01-07 03:11:30
问题 I want looked for "if exists", but sap hana sql was not understand for "if exists". whether i was created sql-command wrong. If 'Y' for the record exists in table from ZZZ_Exercise_3, else 'N' for the record not exists in table from ZZZ_Exercise_3. If old record for 'N' then this record delete should. CREATE COLUMN TABLE ers.ZZZ_EXERCISE_5( ID INT NOT NULL PRIMARY KEY generated by default as IDENTITY, Orig_ID INT, COMPANY nvarchar(251), VALID char(1) ); COMMIT; IF EXISTS( INSERT INTO ZZZ

Selecting multiple parameters from UDF or procedure

主宰稳场 提交于 2020-01-06 23:56:12
问题 I'm trying to compute multiple values and fetch them in a select clause. Whether its computed via UDF or procedure does not matter to me but I can't figure out how to do it in either way. I want to use it like this: SELECT ID, BITMAP(ID) FROM X; which then should return a table with columns ID, Bitset1, Bitset2 . If possible it should be as performant as possible. I have three versions currently (simplified, there's actual more computation): Table UDF CREATE FUNCTION TPCH.BITMAP(IN col BIGINT

How does one handle exceptions in date casting in SAP's HANA?

北城以北 提交于 2020-01-05 09:05:33
问题 QUESTION SUMMARY: What is the proper way within HANA SQL or HANA Studio in a view (Calculation, attribute or Analytic) to handle invalid data when attempting to cast to a date so a user can filter the data? In SAP's table KONM the field KSTBM is a datatype of decimal(15,3). This field right or wrong, stores a date value in YYYYMMDDHHM.MSS format. (I'm a user not a designer of the system. Why anyone stores a date in a decimal field instead of a oh a date/time field is beyond the purview of

sap hana - select top expression

删除回忆录丶 提交于 2020-01-04 04:54:11
问题 I have a problem with a stored procedure. The procedure gets as an argument the number of rows needed, but the following does not work in HANA: SELECT TOP :NUM_OF_ROWS * FROM TABLE_NAME I read that TOP in HANA only receives a number, not an expression. Is there another way to do this? My solution for the moment is to select everything and delete the unneeded records on the service, but it's not very efficient. 回答1: Instead of TOP n you can use the LIMIT n option. That one can bind variables.

SQL capped, continuous sum

帅比萌擦擦* 提交于 2020-01-01 06:46:53
问题 Assume a time series where we have one value per point in time. I have to calculate a continues sum by calculating the current value + the sum of the previous value. Tricky part however is, that the sum should be capped and hence not exceed a certain value. Example: Sum is capped at +2. +-----+---------+------------+ | row | measure | capped sum | +-----+---------+------------+ | 1 | 1 | 1 | | 2 | 3 | 2 | | 3 | 4 | 2 | | 4 | -2 | 0 | | 5 | 1 | 1 | +-----+---------+------------+ e.g. the

How to split multiple values from a row into separate rows?

为君一笑 提交于 2019-12-31 04:33:08
问题 I want to split multiple values from a row into a separate row in sap hana sql. table : id name 1 kabil,arasan but I want an output like this: id name 1 kabil 1 arasan 回答1: try to avoid csv-like data in columns, e.g. normalize during ETL process you can use a procedure, see [HANA: Split string? without a procedure you can use the following SQL (restriction: it assumes a maximum number of values in your csv-field). I would use it only for adhoc purposes. CREATE COLUMN TABLE "TEST_SPLIT"( "SOME

SAP HANA Education: Course & Certification Program 2013(SAP HANA认证考试)

橙三吉。 提交于 2019-12-30 01:51:43
The SAP HANA SPS05 education portfolio includes the following courses and certifications. This table will be updated regularly, so bookmark it for easy access and subscribe to email alerts to stay up-to-date. All information on available certification and training program for SAP HANA can be accessed through SAP’s online Training & Certification shop . Instructor led (classroom or virtual) HA100 – SAP HANA – Introduction (2-day course ) Technical overview course addressing all target audiences. Delivery: Instructor led in physical or virtual classroom. HA150 – SQL Basics for SAP HANA (2-day

Column store error in HANA

随声附和 提交于 2019-12-25 19:40:39
问题 Simple question, does anyone know what this error statement means " SAP DBTech JDBC: [2048]: column store error: search table error: [34086] "? How can it be rectified?. 回答1: This is too little information about the error. Provide more data about what you do and check the indexserver tracefile for a more extensive error message. Lars 来源: https://stackoverflow.com/questions/30733756/column-store-error-in-hana