Skip to Content
0

Create temporary local table in function on HANA

Feb 08, 2017 at 12:24 PM

919

avatar image

Hello everybody,

I try to create a function in SAP HANA studio returning a table. Inside this function a temporary local table must be created and populated. Using the same method in sql server everything runs smoothly but in HANA I get an error on local table creation: "SAP DBTech JDBC: [7]: feature not supported: DDL is/are not supported in table function: line 16 col 5 (at pos 720)"

I guess HANA does not support temporary table creation inside functions, If I am wrong please correct me, but if that's true is there a similar way to store temporary table results in some kind of variable inside a function?

Kind Regards,

Dimitris

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Rajaa Bhalamuthukrishnon
May 22, 2017 at 11:23 AM
0

Hi Dimitris,

Table Functions are read-only user-defined functions, hence DDL statements are not supported.

I had a similar requirement and achieved it with a work around solution by creating a stored procedure, I then used the procedure in table function.

Hope this helps.

Best Regards,

Rajaa

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

Hello Rajaa,

thank you for your answer.

It seems like this workaround is the only possible solution to this problem.

Kind regards,

Dimitris Theotokatos

0