Showing posts with label Tips & Tricks. Show all posts
Showing posts with label Tips & Tricks. Show all posts

Thursday 14 September 2017

SAP HANA: How to copy tables from one schema to another schema in SAP HANA?


  1.       How to create a new table based on the existing table in another schema without data i.e., only the structure of the table?

SYNTAX:

create column table "New_Schema_Name"."New_Table_Name" like "Old_Schema_Name"."Old_Table_Name";

CODE:


create column table "KABIL"."EMPLOYEE_SAMPLE" like "KABIL_PRACTICE"."EMPLOYEE_SAMPLE";

RESULT:



2. How to create a new table based on the existing table in another schema with data?

SYNTAX:

create column table "New_Schema_Name"."New_Table_Name" as ( select * from "Old_Schema_Name"."Old_Table_Name");

CODE:

create column table "KABIL"."EMPLOYEE_SAMPLE" as ( select * from "KABIL_PRACTICE"."EMPLOYEE_SAMPLE");

RESULT:


Tuesday 25 July 2017

How to check HANA Database Version?

1. Right click on the HANA system and choose “PROPRTIES”.


2. In the properties window, select Version History. Here you will find the SAP HANA DB Version.

Tuesday 18 July 2017

Generate INSERT INTO statement From EXCEL

Scenario:

              Here, I have to generate an INSERT INTO Statement From Excel Using Formula.

Example:

From the above sheet, I’m going to create insert into statement.
Enter the following formula in a formula bar in an empty cell on the same sheet.