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 IndexWebSphere Message Broker SupportPass parameters for Select sub-query Inside Passthru

Post new topicReply to topic
Pass parameters for Select sub-query Inside Passthru View previous topic :: View next topic
Author Message
Sneh4nsu
PostPosted: Tue Sep 19, 2017 11:20 am Post subject: Pass parameters for Select sub-query Inside Passthru Reply with quote

Novice

Joined: 11 Aug 2017
Posts: 12

Code:
SET Environment.Variables.po_Bod = PASSTHRU('select dbms_xmlquery.getxml(''select PB.PO_NUM,PB.FACILITY,
          cursor(select H.*,cursor(select D.*,cursor(select item.UNIT_OF_MEASURE FROM SSIMSPRD.SQLDAT3_SSITMCDS item WHERE item.CORP_ITEM_CD=D.CORP_ITEM_CD) CDS
                  FROM SSIMSPRD.SQLDAT3_WMPODETL D where D.FACILITY=H.FACILITY
                    AND D.PO_NUM= H.PO_NUM) PO_DETAIL,               
           cursor(select V.*
                    FROM SSIMSPRD.SQLDAT3_APVMAS V
                    WHERE V.VEND_NUM=H.VEND_NUM
                    AND V.VEND_SUB_ACNT= H.VEND_SUB_ACNT
                    AND V.CORP = H.CORP) PO_VENDOR
 FROM SSIMSPRD.SQLDAT3_WMPOHEDR H where PB.FACILITY=H.FACILITY AND PB.PO_NUM = H.PO_NUM and PB.PROCESS_IND=?) HDR from SSIMSPRD.PO_BOD PB where PB.PO_NUM =?'')X FROM DUAL;') VALUES('N','647203');

I am unable to pass the parameters.Without this two parameters the code is working fine.Any suggestion would be helpful.
Back to top
View user's profile Send private message
hotshot
PostPosted: Thu Sep 21, 2017 2:58 pm Post subject: Reply with quote

Novice

Joined: 04 Jan 2013
Posts: 19

Quote:
I am unable to pass the parameters.

What is happening instead?
Also what does an odbc trace show?
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Sep 22, 2017 4:36 am Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 316
Location: Columbus, OH

Build the database command in a string and then pass the string to the passthru command.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportPass parameters for Select sub-query Inside Passthru
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.