|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Pass parameters for Select sub-query Inside Passthru |
« View previous topic :: View next topic » |
Author |
Message
|
Sneh4nsu |
Posted: Tue Sep 19, 2017 11:20 am Post subject: Pass parameters for Select sub-query Inside Passthru |
|
|
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 |
|
 |
hotshot |
Posted: Thu Sep 21, 2017 2:58 pm Post subject: |
|
|
Novice
Joined: 04 Jan 2013 Posts: 20
|
Quote: |
I am unable to pass the parameters. |
What is happening instead?
Also what does an odbc trace show? |
|
Back to top |
|
 |
joebuckeye |
Posted: Fri Sep 22, 2017 4:36 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Build the database command in a string and then pass the string to the passthru command. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|