Skip to Content
0

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

May 05, 2017 at 06:19 AM

54

avatar image
Former Member

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
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member May 05, 2017 at 06:42 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded