cancel
Showing results for 
Search instead for 
Did you mean: 

Use of iteration in on SAP HANA table in Stored Procedure

former_member530232
Participant
0 Kudos

Hi,

I have a table say X.In this table i have 10 diff table names in one of the column. Now i have to write a stored procedure to include the DML statement to "unload from memory" for all the tables present under the table X.Since table X has now 10 different tables i have to go for loop ,so that when the procedure is called the unload sql statement gets executed 10 times automatically and the unload operation in performed.

Can someone please help me with a sql code ,how to perform this.

Please let me know if my question make sense.

Actually i am some what new to HANA.

Thanks In Advance.

lbreddemann
Active Contributor

First off: Florian is absolutely right. You may follow his advice.

However, this is a perfect example for a question where someone tries to automate a bad patch for something perceived as a problem but not well understood. Don't get me wrong, it's never a failure to be new to a technology (we all are - always).
In fact: welcome aboard!
But the pattern here is similar to "not being able to safely handling a screwdriver, but grabbing the power-tools right away". There's Damage Ahead this way!

If you want to see the tables leaving the memory earlier for some reason, then you might just assign them a different unload priority and let HANA do the work. Trying to overly control a system you don't understand won't likely give you the desired result.

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor

If it is really necessary that the unload statement is executed for all the tables within a stored procedure you have have several options to implement it. For instance:

former_member530232
Participant
0 Kudos

Thanks Florian.Cursors has helped me.