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

Re: Table column type error using ARRAY_AGG in SQLScript

$
0
0

Hi Addi,

 

    Thank you for your reply and suggestions.

    You asked why I want to add a column to a table variable. The problem lies in: I can't find the proper XSJS API to consume more than one result sets returned from the Procedure it calls.

 

    In XSJS, it invokes the procedure:

Capture.JPG

   and the last '?' represents the result set it returns.

 

   After checking XSJS API (http://help.sap.com/hana/SAP_HANA_XS_JavaScript_Reference_en/$.db.ResultSet.html), it seems that only one result set can be returned at a time.

 

   On the other hand, inside the Procedure, I want to return tables like this:

Capture.JPG

   In order to return these two tables (temp_major_list, temp_rank_list) at a time, I construct a global table type:

Capture.JPG

   In this case, I have to add one column called 'TYPE' to tell different result sets apart.

 

 

   This is the complete story. Can you come up with better solutions? Any suggestion would help a great deal.

  

   By the way, are there more ways to call Procedure of functions in XS project instead of XSJS?

 

 

Thank you and best regards,

Angel


Viewing all articles
Browse latest Browse all 8507

Trending Articles



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