cancel
Showing results for 
Search instead for 
Did you mean: 

update&delete Temporary Table in HANA

byungseok_lee
Explorer
0 Kudos

Hello Experts,,i'm a new to SAP HANA

Can I  update&delete temp table in hana ?

I can insert data into temp table in hana but i can not delete & update

------sample1---------------------------------------------

DELETE   FROM   #TEMPTABLE   WHERE columnname= '7'

------sample2---------------------------------------------

UPDATE #TEMPTABLE 
SET columnname= '11'

---------Error------------------------------------------------

SAP DBTech JDBC: [7] (at 8): feature not supported: update statement for volatile table:
---------------------------------------------------------
Best regards and thanks to all of you that have helpfull answears, Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I am having the exact same problem here. Probably is a bug. Hopefully they will fix it in SP9.
However, deletes and updates in temp tables do work in procedures created directly in the HANA studio console (as tested in the code below), but won't work in HANA artifacts.


DROP PROCEDURE TESTS;

CREATE PROCEDURE TESTS(

)

LANGUAGE SQLSCRIPT AS

BEGIN

CREATE LOCAL TEMPORARY TABLE #TEMPLALA (campo1 INT);

INSERT INTO #TEMPLALA VALUES (1);

UPDATE #TEMPLALA

SET campo1 = campo1 + 2

WHERE campo1 = 1;

SELECT * FROM #TEMPLALA;

DELETE FROM #TEMPLALA

WHERE campo1 = 3;

SELECT * FROM #TEMPLALA;

BEGIN

DROP TABLE #TEMPLALA;

END;

END;

CALL TESTS()