Skip to Content
avatar image
Former Member

HANA procedure , syntax to delete table emtries.

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 14, 2016 at 08:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded