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 » Issues while executing the SQL query in broker

Post new topic  Reply to topic
 Issues while executing the SQL query in broker « View previous topic :: View next topic » 
Author Message
Vanshul_MB
PostPosted: Tue Jun 07, 2011 2:40 am    Post subject: Issues while executing the SQL query in broker Reply with quote

Acolyte

Joined: 09 Feb 2011
Posts: 68

Hi,

My query is

SET Environment.Variables.ConfigData.PropertyDetails[]= PASSTHRU ('SELECT HTL_CHN_CD, HTL_PRP_CD, NM, AD_LN1, AD_LN2, AD_LN_3, CTY_NM, TSP_LOC_CD, ST_CD, ZIP_CD, CTR_CD, PHN_NO, FAX_PHN_NO, CHK_IN_TM, CHK_OUT_TM, TAX_RT, FRE_TSP_IN, FIR_SFY_IN,NO_ROM FROM TSO.HTL_PRP_CNT WHERE HTL_CHN_CD IN (?) AND HTL_PRP_CD IN (?)' TO Database.ESBLYR Values(CH_ChainCodes,CH_PropertyCode));

So i have 2 inputs

CH_ChainCodes
CH_PropertyCode

I will get a single value for the first one ie ChainCode but multiple values for the next one (one per file)
I am concatenating each and using a ,

So my query will be something like

SELECT HTL_CHN_CD, HTL_PRP_CD, NM, AD_LN1, AD_LN2, AD_LN_3, CTY_NM, TSP_LOC_CD, ST_CD, ZIP_CD, CTR_CD, PHN_NO, FAX_PHN_NO, CHK_IN_TM, CHK_OUT_TM, TAX_RT, FRE_TSP_IN, FIR_SFY_IN,NO_ROM FROM TSO.HTL_PRP_CNT WHERE HTL_CHN_CD IN ('AA') AND HTL_PRP_CD IN ('AAANN','AABZM')



The issue is when i am passing it as a parameter(which is declared as a CHARACTER), it will obviosult take full string as a single string.

How can we do this using any other datatype?
So that 'AAANN','AABZM' is considered as two different values separated by a comma?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issues while executing the SQL query in broker
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.