hana

SQL query to fetch OrderID, transactionID, Status based on transaction status which is Char

一曲冷凌霜 提交于 2019-12-08 11:45:07
问题 I have below tables where I want to get lowest transaction entry based on Status which is Char. Table1 (Order): OrderID Product ------------------ 1 A 2 B 3 A Table2 (Transaction): OrderID TransactionID Status --------------------------------- 1 1 LOW 1 2 HIGH 1 3 MID 2 4 MID 2 5 HIGH 3 6 LOW How can I get transaction with the lowest status OrderID Status ----------------- 1 LOW 2 MID 3 LOW 回答1: One method uses row_number() : select t.* from (select t.*, row_number() over (partition by

how to reproduce an analytic view in SAP HANA database using the .analyticview xml descriptor file?

你离开我真会死。 提交于 2019-12-08 01:48:51
问题 I am trying to reproduce an analytic view that have already been modeled in one project within another project using the .analyticview XML file descriptor. I managed to reproduce the required attribute views by copying and activating the .attributeview xml files to the new project. But when trying to activate the .analyticview I am getting an error saying: Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Model view/data not consistent

2647673 - HANA Installation Failure with signal 11 core dumped

≯℡__Kan透↙ 提交于 2019-12-07 15:04:27
Symptom HANA 2.0 SPS03 installation using hdblcmgui failed due to the below error message. [Error] /usr/sap/HDD/HDB00/exe/hdbnsutil call failed Program /usr/sap/HDD/HDB00/exe/hdbnsutil terminated with error: signal 11 core dumped Installation of SAP HANA Database failed Installation failed error installing Cannot create Instance Cannot create instance Cannot create initial topology Environment HANA 2.0 SPS03 IBM Power platform LINUX SLES12 SP3 Kernel version : 4.4.73 Reproducing the Issue Install HANA2.0 with SLES12 SP3 (kernel version is less than 4.4.120-94.17.1) Install failed with the

Trouble connecting to a remote HANA database via JDBC

女生的网名这么多〃 提交于 2019-12-06 12:18:39
问题 I'm running a small JAVA program from my laptop trying to connect via JDBC to our HANA server for a "Can we?" prototype. I understand it's possible to connect via JDBC connection to a remote HANA server. However, I cannot. Here's the methodology I'm using from the JAVA using the sapdbc.jar file. I'm just testing a connection here. DataSourceSapDB ds = new DataSourceSapDB(); ds.setServerName("10.x.x.xxx"); ds.setPort(30015); ds.setDatabaseName("dbNAME"); ds.setUser("myUser"); ds.setPassword(

How to convert BLOB to varchar with SAP HANA database using SQL

旧巷老猫 提交于 2019-12-06 10:19:13
问题 how do I cast a blob to varchar with SAP HANA database using SQL. (we need the column to be stored in blob - not TEXT - in else HANA automatically creates an index on this column. But we need an index with full-text-search and CORE_EXTRACTION) The following code select cast("DESCRIPTION" as varchar) "D" from "DESC" returns Could not execute 'select cast("DESCRIPTION" as varchar) "D" from "DESC"' in 30 ms 168 µs . SAP DBTech JDBC: [266]: inconsistent datatype: 回答1: Solved the problem with this

[转帖]SSD和内存数据库技术

吃可爱长大的小学妹 提交于 2019-12-06 04:09:32
SSD和内存数据库技术 自己的理解还是不是很对 SSD 提升的是 随机读 并没有对顺序写有多大的提升, 因为数据库采用的是redo的模式. 理论上写入 时是顺序写 所以 写并发的提升不会很大 但是会很大的提升读取的速度. 2016-04-26 10:57:47 dingdingfish 阅读数 7650 更多 分类专栏: 内存数据库 In-Memory Computing Technology 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接: https://xiaoyu.blog.csdn.net/article/details/51248768 本文为阅读书籍 Next Generation Databases: NoSQL, NewSQL, and Big Data 第7章: The End of Disk? SSD and In-Memory Databases的笔记。 磁盘已死? 比尔.盖茨在1981年曾说过: 640K of memory should be enough for anybody. 在2001年,他意识到之前的说法是错误的: I’ve said some stupid things and some wrong things, but not that. 从第一个数据库诞生以来

Insert array in HANA with JAVA

纵饮孤独 提交于 2019-12-03 22:32:49
问题 I am having an arraylist of objects and trying to insert the list into HANA. So my insert code looks like PreparedStatement stmt = conn .prepareStatement("INSERT INTO SCHEMA.TABLE VALUES" + " (?, ?, ?, ?, ?, ?, ?, ARRAY("+"1,2,3"+")"); for (int i = 1; i <= ITERATION_MAX; i++) { stmt.setInt(1, listofdata.get(i).get_id()); stmt.setInt(2, listofdata.get(i).get_name()); stmt.setInt(3, listofdata.get(i).get_place()); stmt.setInt(4, listofdata.get(i).get_year()); stmt.setInt(5, listofdata.get(i)

SQL capped, continuous sum

强颜欢笑 提交于 2019-12-03 20:53:38
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 "capped sum" of row 4 is calulated using the "capped sum" from the previous row, "2", and adding the current

SAP HANA Authorisation Error: SAP DBTech JDBC: [258]: insufficient privilege: search table error: [2950] user is not authorized

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: At the moment I try to understand SAP HANAs authorisation concept. I assigned the analytic user the following rights: select on _SYS_BI, _SYS_BIC execute on REPOSITORY_REST root package: REPO_READ If I create an analytic privilege on an information view and assign this privilege to the user then the user is able to query the information view. On the other hand the modeller does not need this analytic privilege to query the information view. So there must be another way to allow the user to query the data - right? And I try to understand how.

HANA: Split string?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to split a string in HANA? Something similar to the equivalent in SQL Server: SELECT * FROM dbo.fnSplitString('valueA,valueB', ',') 回答1: Try this, Refer Here CREATE PROCEDURE SPLIT_TEST(TEXT nvarchar(100)) AS BEGIN declare _items nvarchar(100) ARRAY; declare _text nvarchar(100); declare _index integer; _text := :TEXT; _index := 1; WHILE LOCATE(:_text,',') > 0 DO _items[:_index] := SUBSTR_BEFORE(:_text,','); _text := SUBSTR_AFTER(:_text,','); _index := :_index + 1; END WHILE; _items[:_index] := :_text; rst = UNNEST(:_items) AS