Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Calling Procedure from XSJS

$
0
0

Hi All,

 

I have two questions.

 

1. How to write a where condition in the below case

 

function test(){

var body = '';

   var val1 = $.request.parameters.get('oVal1');

 

             try {

                    var query =

    'select \"A\", \"B\"

                              + 'FROM \"amohas97.session.data::sdyn\" + where \"A\" =



var conn = $.db.getConnection();


var pstmt = conn.prepareStatement(query);


var rs = pstmt.executeQuery();

 

without the where condition my query works fine and it pulls/display all the records.

 

I am not sure how to write clause using my variable val1 in this case.

 

 

2. I have created a get_data.procedure. Now i want to use this .procedure in my .XSJS service. I want to use val1 as my importing parameter.

 

Any Alternatives/Suggestions.

Thanks for comments in advance.

 

Message was edited by: Shahid Mohammed Syed


Viewing all articles
Browse latest Browse all 4343

Trending Articles



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