/scripts/ahub.form.attachments.js
0

Use of iteration in on SAP HANA table in Stored Procedure

Jan 24, 2017 at 01:32 PM

80

avatar image

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.

10 |10000 characters needed characters left characters exceeded

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.

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Jan 24, 2017 at 03:08 PM
1

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:

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Florian.Cursors has helped me.

0
Skip to Content