I have this code below, I have to call it many times: like: SHOW_PEG("Hiton", "5454", "14574"); is it possible to send a table of inputs SHOW_PEG(Hotel, dataId,, recordId); Because, for now I use the code below and I have to call it many times. I want to be able to send a result table and process all the queries within my oracle program.
Originally posted by bobby, morkos: [QB]Can you help me in modifying my code above. I can then use it as a reference. I hope you can help, to get my example working.
So, let me get it right, your saying that it is possible to send an array into a procedure and go through the array in that same procedure. What I have is I want to retrieve many record set and return it to my java program without going back and forth. Your code that you showed me is hard to understand. What I have is the following: In my java program: // Calling the Oracle procedure String query = "begin :1 := SHOW_PEGASUS('"+ ownerId + "', '"+ propertyCode + "', '"+ chainCode + "'); end;"; CallableStatement cs = _con.prepareCall(query); cs.registerOutParameter(1,OracleTypes.CURSOR); cs.execute(); _rs=(ResultSet)cs.getObject(1); And ownerId, property Code and chain code is a collection (An array that I loop through it). Now, my procedure is as the following:
I hope you understand what I'm trying to do. And if you could show me how to modify my code in order to function, it would really help me. I just need this as a reference. I hope you can help me and I really appreciate any help. Thanks.