Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Dynamic SQLScript in Hana on dynamic table

$
0
0

Hi all,

 

I am reading the Hana SQL Script reference but I can't find any reference on how to create a procedure in sql script that receive in input a TABLE NAME and execute some operation on that table .

 

Like that :

 

I have 2 DB table as SOURCE_TABLE_NAME and TARGET_TABLE_NAME having the same structure

PROCEDURE1 - ( INPUT SOURCE_TABLE_NAME and INPUT  TARGET_TABLE_NAME )

(

   TRUNCATE TARGET_TABLE_NAME;

   INSERT INTO TARGET_TABLE_NAME FROM ( SELECT * FROM SOURCE_TABLE_NAME )

)

 

Then, if a call :

call PROCEDURE1(db_tb_a, db_tb_b)

 

the effect is that i have in  db_tb_b the same record of db_tb_a .

 

 

thank you


Viewing all articles
Browse latest Browse all 5653

Trending Articles