Posted: Wed Jun 08, 2005 8:18 pm Post subject: SQL SELECT not working
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
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.
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