cancel
Showing results for 
Search instead for 
Did you mean: 

Create temporary local table in function on HANA

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Rajaa
Discoverer
0 Kudos

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

Former Member
0 Kudos

Hello Rajaa,

thank you for your answer.

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

Kind regards,

Dimitris Theotokatos

Answers (0)