Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Issue with Arrays in SQL (Column store error: [34011])

$
0
0

Hello,

 

I have an error when using arrays in sql coding in my calculation view

 

My target is to have the different values of the array.

 

In this sample coding, I want to have the first value in the array (original coding is much more complex)

 

I get my data from table ZTAB, only column COL which is NVARCHAR(1)

 

Coding is as bellow:

 

BEGIN
DECLARE ma      NVARCHAR(1) ARRAY;
DECLARE ar      NVARCHAR(1) ARRAY;
DECLARE lv_ar   NVARCHAR(1);
lt_tab = select distinct col from ztab;                  
ar := ARRAY_AGG(:lt_tab.col);
lv_ar := :ar[1];                                          
var_out = UNNEST(:ma, :ar) AS ("MANDT", "COL");              
END ;

The problem come from line 7 (lv_ar := :ar[1];), if I delete line 7 activation will be ok...

For sure it's a conversion error in line 7 but I don't understand why...

 

Error text:

Internal deployment of object failed;Repository:

Encountered an error in repository runtime extension;Internal

Error:Deploy Calculation View: SQL: transaction rolled back by an internal error:

column store error: [34011] failed to save calculation scenario :

The following errors occured: Inconsistent calculation model (34011)

 

Thank you in advance for your help.

Moez.


Viewing all articles
Browse latest Browse all 5653

Trending Articles



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