I'm trying to run a Sql Script through an OdbcConnection to HANA in a .net project. My first problem is id does not open the odbc connection to the schema that I specify as value for DATABASE in my connection string. First question, is there a way to set the default schema for a user?
To get around the default schema problem, I try to add the line: SET SCHEMA MySchema; to the front of the below script. If I run the entire script in HANA Studio, it works. But when I run it in my .net code, it keeps giving syntax error after ";". If looks like it won't recognize multiple statements separated by ";". What should I be passing as the CommandString if I have multiple lines like below?
CREATE TABLE #TempTable ("DocNum"VARCHAR(15), "OrderStatus"VARCHAR(8)); INSERT INTO TempTable SELECT "DocNum", 'Pending' FROM MyTable1; INSERT INTO TempTable SELECT "DocNum", 'Complete' FROM MyTable2; DROP TABLE #TempTable Also, does HANA also treat a tablename starting with # as a temp table like MSSQL does?