ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Call Oracle Store procedure with refcursor as output type

Post new topic  Reply to topic
 Call Oracle Store procedure with refcursor as output type « View previous topic :: View next topic » 
Author Message
ghoshly
PostPosted: Thu May 30, 2013 8:49 am    Post subject: Call Oracle Store procedure with refcursor as output type Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 333

Hello,

I am using WMB 7.0.0.5 and would like to call a Store procedure in Oracle 11g (as sample below) which has a refcursor out parameter.

Code:
create or replace
procedure test_SP(role IN varchar, dept IN integer, p_cursor out sys_refcursor)
is
begin
  open p_cursor for
    select EMP.EMPNO, EMP.ENAME, EMP.SAL, demo_states.state_name
    from   EMP , DEMO_STATES
    where EMP.DEPTNO = dept AND
    EMP.job = role AND
    demo_states.st = 'CA';
end;


I understand I should not use PASSTHRU, instead I should use CALL statement. I am refering http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac17040_.htm
but not very sure how to call and get the output from refcursor. Is it the same way of resultset?? It would be very helpful if any sample is there. Thanks for your help.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 30, 2013 9:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

The nine days of training will explain how you can do this.

If you'd rather read the InfoCentre, you can use Google to find the relevant pages, or click here and follow the bread crumbs:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac17040_.htm
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Call Oracle Store procedure with refcursor as output type
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.