Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Can't DECLARE table variable.

$
0
0

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.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>