Hi, everyone.
I'm trying to declare a table variable in my procedure, however, SAP HANA can not create the procedure due to the "... incorrect syntax near "(" ...". I deliberately copied the example from the SAP HANA SQL Script References, and it returns the same issue.
-- For instance:
SET SCHEMA "MyDB";
DROP PROCEDURE "MyProc001";
CREATE PROCEDURE "MyProc001" () LANGUAGE SQLSCRIPT AS
BEGIN
DECLARE temp TABLE(DocEntryINTEGER, DocNum INTEGER); -- here HANA says: "... incorrect syntax near "(" ..."
temp = SELECT "DocEntry", "DocNum" FROM OPOR;
END;
What do I make wrong?
Regards, Evgeny.