Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8720

Re: Array processing in HANA

$
0
0

Hi Andy,

 

Did you find a way to read an array element into a scalar? 

 

According to the SQL script guide linked to above, section 7.7.4 "RETURN AN ELEMENT OF AN ARRAY" says that this sort of code should work:

 

CREATE PROCEDURE test (OUT output integer) READS SQL DATA AS

BEGIN

DECLARE id INTEGER ARRAY := ARRAY(1, 2, 3);

DECLARE n INTEGER := 1;

output := :id[:n];

END;

 

I am using SPS06 and Studio Rev 62 and the above code does not compile.  It complains about this line, saying that the "[" is misplaced:

 

output := :id[:n];

 

Thanks,

Kevin.


Viewing all articles
Browse latest Browse all 8720

Trending Articles



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