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 » compute node for database

Post new topic  Reply to topic
 compute node for database « View previous topic :: View next topic » 
Author Message
mahek
PostPosted: Fri Feb 18, 2005 10:02 am    Post subject: compute node for database Reply with quote

Voyager

Joined: 10 Sep 2004
Posts: 87

Hi all,
I am using the compute node and i have the following esql code
DECLARE C CHAR;
SET C =THE(SELECT T.NAME FROM Database.DB2ADMIN.EMP AS T WHERE T.VAL='121');
SET OutputRoot.XML.Name.FirstName=C;

When i am doing this it is not working properly and going to the queue which is associated with the compute fail.

But when i do this it is working properly
SET OutputRoot.XML.N.FN=THE(SELECT T.NAME FROM Database.DB2ADMIN.EMP AS T WHERE T.VAL='786');

Can any one tell me what mistake i am doing.

Thanks
Back to top
View user's profile Send private message
Craig B
PostPosted: Mon Feb 21, 2005 1:38 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Hi,

Your first ESQL attempts to receive the result of the SELECT into a scalar CHAR variable. However when a SELECT is used with just the THE clause, then this is not guaranteed to return a scalar variable. To guarantee that a scalar is returned the THE and ITEM clauses must be used in the SELECT. Please see the ESQL documentation for a full description of this. The second ESQL statement you wrote has a field reference on the LHS and so this can receive structures and arrays and so this would be compatible when not using either THE or ITEM or not using either of them.
Hope this helps.
_________________
Regards
Craig
Back to top
View user's profile Send private message
mahek
PostPosted: Wed Feb 23, 2005 11:45 am    Post subject: Reply with quote

Voyager

Joined: 10 Sep 2004
Posts: 87

Hi Craig,
Thanks it worked when i used the ITEM CLAUSE.
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 » compute node for database
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.