cancel
Showing results for 
Search instead for 
Did you mean: 

HANA procedure , syntax to delete table emtries.

Former Member
0 Kudos

Hi All,

I have created a HANA sql procedure. which is something like :

itab0 = select * from ......;

itab1 = select ....... from itab0;

itab2 = select ........ from itab1;

i want delete all entries from table once it is of no use further. For example after Itab1 fetches data from itab0 including some calculations , then I want to make itab0 empty. to free its memory. but DELETE FROM :ITAB0 is not working.

what is the syntax to do so?

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

I think with some refactoring of your coding you will not have such situations you are thinking about (from my opinion at the moment the coding looks like ABAP coding several years old).

But just from a technical side. DELETE/TRUNCATE are not supported on SQLScript delcared table variables. One option to "remove" the entries would be to make a dummy select with a where-condition producing no result.

itab0 = select * from :itab0 where 1 = 2;

Regards,
Florian

Former Member
0 Kudos

Thanks Florian,

Could you please suggest me any document or website where i can learn new methods for writing SQL procedures in HANA?

pfefferf
Active Contributor
0 Kudos

I think a good starting point is the SAP HANA SQLScript Reference and the SAP HANA development courses provided at OpenSAP.

Regards,
Florian

Answers (0)