cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the written sql

Former Member
0 Kudos
47

Hi all,

I have written an sql statement to create a schema and table .  I want to see the written sql statement  , how to view it? I have tried by clicking the sql editor  by  choosing  root node:HDB system (Hana), schema and table, and stll unable to view the sql statement.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182277
Contributor
0 Kudos

Hello Ash,

Please follow the following steps:

1. Right click on table > Open definition

2. On the extreme right hand side you will find four icon.

3. Please press the last icon on the extreme right

please refer the below picture of the same.

you will find the SQL of your created table.

Hope it is helpful.

Regards,
neha

Former Member
0 Kudos

Hi Neha,

Thank You. I am able to see the  SQL which was coded, However another question I have got

  Like a program, can I write all the sql coding ina single place . for e.g. creation of schema, table and to populate the table .

Thanks

Ravi_Channe
Active Contributor
0 Kudos

Hi Ash,

Few options:

1) You can write all these statements in a stored procedure and the code will hence be stored in the HANA system as the procedure object.

2) If you write the SQL code in the SQL tab, you can save the tab as a .sql file.

3) You can save the workspace with all the tabs opened in the Studio.

4) My preferred way: I always write my SQL statements and Store procedure codes in a text file and have the text file saved on the local folder.

Depending on your choice, you can use any of the method mentioned above.

Regards,

Ravi

former_member182277
Contributor
0 Kudos

Hello Ash,

yes, you can write and there are many ways for the same:

1. In SQL Editor you can write and save also in the local file.

2. In the stored procedure you can write.

Hope it is useful.

Regards,

neha

Answers (0)