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

Unable to call a stored procedure from XSJS

$
0
0

Hi ,

 

I am trying to call a stored procedure from Predictive Analytics Library in an xsjs, but I am having syntax error, would you please advice:

 

function generateData(table){  var conn = $.db.getConnection();
// var generateDataQuery = "CALL \"_SYS_AFL.PAL_DISTRRANDOM_PROC\"(?, ?, ?) with overview";  var generateDataQuery = "CALL \"_SYS_AFL\".\"PAL_DISTRRANDOM_PROC\"(?, ?, ?) with overview";  var cstmt = conn.prepareCall(generateDataQuery);  cstmt.setString(1, "PAL_DISTRRANDOM_DISTRPARAM_TBL");   cstmt.setString(2, "PAL_CONTROL_TBL");  cstmt.setString(3, table);  cstmt.execute();  conn.commit();   close([cstmt,conn]); 
}

 

The first generateDataQuery gives me this error :

 

Error while executing query: [dberror(Connection.prepareCall): 328 - invalid name of function or procedure: _SYS_AFL.PAL_DISTRRANDOM_PROC: line 1 col 6 (at pos 5)]

 

The other generateDataQuery gives me this error:

 

Error while executing query: [dberror(Connection.prepareCall): 7 - feature not supported: Parameterized input table parameter is not allowed: line 1 col 40 (at pos 39)]

 

Thank you so much for your support in advance,

Shady


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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