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 » SQL SELECT not working

Post new topic  Reply to topic
 SQL SELECT not working « View previous topic :: View next topic » 
Author Message
umesh
PostPosted: Wed Jun 08, 2005 8:18 pm    Post subject: SQL SELECT not working Reply with quote

Novice

Joined: 13 May 2005
Posts: 16

Hello all,

I have ESQL code here as below,



SET Environment.Variables.Result[] = (SELECT T.CD ,T.NAME FROM Database.CODES as T);
SET Environment.Name.queueMgr= (SELECT TRIM(both from 'B.VL') from Database.a.table1 as B where B.NM='ERQM') ;

FOR xyz AS Environment.Variables.Result[] DO
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.MQMD = InputRoot.MQMD;

SET OutputRoot.MRM.Details.Result.CD=xyz.CD;
SET OutputRoot.MRM.Details.Result.NAME=xyz.NAME;

SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName= xyz.CD || '.I.1' ;
SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueManagerName = queueMgr;

PROPAGATE;

END FOR;

RETURN FALSE;

Now I have to set the queue manager name also which is to be obtained from look up to database. this always returns a single value and this is constant for all queues. I have included a query after my first query which is not fetching any results.when i execute this query from db2 cmd it is working. can anyone tell me why this is not working? I also tried making queueMgr to queueMgr[] . In debugger no values are reurned from second query whereas first one is working

thanks for any help

umesh
Back to top
View user's profile Send private message
Feysn
PostPosted: Thu Jun 09, 2005 4:29 am    Post subject: Reply with quote

Apprentice

Joined: 04 Jun 2004
Posts: 33
Location: Wilrijk

Try including the DB2 schema. Probably if you log on with the DB2 CMD you are logged to your default schema.

SELECT * FROM Database.DBSCHEMA.TABLENAME ....
Back to top
View user's profile Send private message Visit poster's website
JT
PostPosted: Thu Jun 09, 2005 5:36 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
Now I have to set the queue manager name also which is to be obtained from look up to database. this always returns a single value and this is constant for all queues

Then use the ITEM and THE parameters on the SELECT call.
Back to top
View user's profile Send private message
umesh
PostPosted: Sun Jun 12, 2005 9:53 pm    Post subject: Reply with quote

Novice

Joined: 13 May 2005
Posts: 16

Hi all,

thanks for response.Including THE solved the problem.

umesh
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 » SQL SELECT not working
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.