cancel
Showing results for 
Search instead for 
Did you mean: 

[SAP HANA] - SUM() function inside temp table error

Former Member
0 Kudos

Hi experts, I just want to know if it is possible to used function inside temp table?

CREATE PROCEDURE "SBODEMOAU"."test" AS (in oCardCode varchar(50)) 
BEGIN

l_data = SELECT SUM("DocTotal") "Sum_amount" FROM OINV WHERE "CardCode" = :oCardCode;
CREATE LOCAL TEMPORARY TABLE "#TempVat" AS (SELECT * FROM :l_data);
SELECT * FROM #TempVat;
DROP TABLE "#TempVat";
);


END

I've received this error:

Could not execute 'CREATE PROCEDURE "SBODEMOAU"."test" (in oCardCode varchar(50)) As BEGIN l_data = SELECT ...'
SAP DBTech JDBC: [7]: feature not supported: Cannot use local temporary table inside a procedure/function: #TEMPVAT

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Problem solved. Need to put double quote on the temp table

Answers (0)