hana

How to create a new database in SAP HANA command line (HDBSQL)?

烈酒焚心 提交于 2019-12-25 08:02:08
问题 I am new to hdbsql and I have logged in to the SAP HANA Server and logged in to the hdbsql terminal as a HDB admin user(SYSTEM). 1.Is it good to create databases as admin user?If not how to create a new user for hdbsql? 2.How to create a new Database in command line?(Will this work "CREATE DATABASE dbname;") Thank you. 回答1: CREATE DATABASE as a command only applies if you are using a multi database container setup. As this question really is more about the concepts of HANA database

Calling R function within SQL - HANA database

喜夏-厌秋 提交于 2019-12-25 06:07:16
问题 When I call Linear Regression function of R on the data set I get an error message stating Could not execute 'CALL ANAGAPPAN.USE_LM("POWER_CONSUMPTION","POWER_CONSUMPTION_OUT") WITH OVERVIEW' in 280 ms 668 µs . SAP DBTech JDBC: [2048]: column store error: search table error: [34086] Convert data error: Convert Data from R to NewDB failed.;Column 'POWER_APP' not computed from R. Code is SELECT POWER_APP,POWER_DB,CPUTI,DBTI,DBSU,KBYTES_TRANSFERRED FROM "POWER_CONSUMPTION"; CREATE COLUMN TABLE

Escaping single quotes in the PLACEHOLDER clause of a HANA SQL statement

不羁的心 提交于 2019-12-25 03:34:33
问题 I noticed an inconsistency in how "HANA SQL" escapes single quotes in the context of the PLACEHOLDER clause. For example, consider the following PLACEHOLDER clause snippet: ('PLACEHOLDER' = ('$$CC_PARAM$$','''foo'',''an escaped single quote \'' ''')) The PLACEHOLDER clause above contains multiple values assigned to the CC_PARAM. parameter. We can see that inside of the second argument we have a single quote that's escaped with a backslash. However, we escape the single quotes outside each

Reccomended method of connecting to an SAP HANA tenant database

百般思念 提交于 2019-12-25 02:28:55
问题 I'm connecting to a SAP HANA tenant database. As I understand it, there are two ways to do this: first, I can specify <server hostname>:<tenant db sql port> for the SERVERNODE connection property. Second, I can specify <server hostname>:<system db sql port> for SERVERNODE and also include the DATABASE connection property set to <tenant db name> . It's recommended to use the second method because it makes operations like moving tenant dbs (i.e. changing sql ports) easier (see "SAP HANA

SAP HANA hdbsequence trigger reset_by manually

女生的网名这么多〃 提交于 2019-12-25 02:22:29
问题 In the project I'm working at the Id for certain insert statements is managed by hdbsequences. Now I want to create a sequence for another table that already has existing data in it and I want it to start with the max id value of the data of that table. I know I could just manually set the "start_with"-Property to it but that is not an option because we need to transport the sequence to another system later where the data in that corresponding table is not the same as on the current system

Greater than operator &gt in Hana

删除回忆录丶 提交于 2019-12-24 22:29:07
问题 I'm passing Sql Staments from Ms sql server to Sap Hana Sintaxis (There are inside an xml file) so I'm confused because I can't can't figure out: Which is the equivalen in SAP Hana for &gt? &gt --> Greater than (used when the sql staments are inside an XML file) Hope someone can help me. 回答1: You just need to convert it back to a >, because it's an xml escape sequence. 来源: https://stackoverflow.com/questions/24083459/greater-than-operator-gt-in-hana

Extracting Table from HANA using R

帅比萌擦擦* 提交于 2019-12-23 04:26:40
问题 This is the table I am trying to grab. From my HANA Database however I keep getting the below error. I know the table exists as I have pulled it in from Qlikview. From Qlikview I pull in the table using the below syntax "_MY_SCHEMA_"."My.Table.Name/Table_ONE" When I try to do the same thing in R using I use the following to grab the same table mydate <- sqlFetch(myconn, "_MY_SCHEMA.My.Table.Name/Table_ONE") This is the error that I get Error in odbcTableExists(channel, sqtable) : table not

How to insert an array in a loop to the database

天大地大妈咪最大 提交于 2019-12-20 04:54:17
问题 I want to insert a set of arrays into a database(HANA) in a loop.My code is below: public class jdemo { public static void main(String[] args) { Connection connection = null; try { connection = DriverManager.getConnection( "jdbc:sap://myhdb:30715/?autocommit=false",myname,mysecret); } catch (SQLException e) { System.err.println("Connection Failed. User/Passwd Error?"); return; } if (connection != null) { try { int [] array=new int []{1,2,3}; Array array1= connection.createArrayof("Integer"

mysqldump store null as blank

无人久伴 提交于 2019-12-14 02:33:40
问题 I use mysqldump to create a dump of my data table. The only problem is, that mysql stores a null value as /N and if I want to import the created CSV file into HANA, /N is not known as null but as varchar. Is there a way to skip the null values during dumping or can I just replace /N with a blank? 回答1: As far as I know,there are no options for handling the output of NULLs. You could try to replace NULLs with empty in your table: UPDATE `tablename` SET columnname= '' where columnname is null 来源

Using Sqoop1 with SAP Hana using a table name that contains forward slash '/' causes error

北战南征 提交于 2019-12-13 07:29:48
问题 Trying to import data from SAP Hana using table that contains a forward slash '/'. Not sure if escaping the '/' will work. My connection attempt: sqoop import –connect jdbc:sap://mysaphost:30015 --driver com.sap.db.jdbc.Driver --username xxxxxx --password xxxx --table xxx./xxx/xxx Produces the following error: 2016-05-20 13:12:23,098 ERROR - [main:] ~ Error executing statement: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "/":