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 » More than one select to update same var

Post new topic  Reply to topic
 More than one select to update same var « View previous topic :: View next topic » 
Author Message
francoisvdm
PostPosted: Fri Jul 18, 2008 5:26 am    Post subject: More than one select to update same var Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

I would like to do two selects, one after the other but the second one must ADD to the result of the first one.

So after first select that returns 2 rows I would like to see:

Environment.Answer.Row[1] = 11111
.Row[2] = 22222

and after second select (3 rows) the Env should look like

Environment.Answer.Row[1] = 11111
.Row[2] = 22222
.Row[3] = abc
.Row[4] = def
.Row[5] = xyz

My first select looks like:
SET Environment.Answer.Row[] = SELECT P.MSG_ID FROM Database.EAI AS P WHERE P.MSG_ID = MSGID;

I would like the second to look something like:

SET Environment.Answer.Row[Current Row items] = SELECT P.MSG_ID FROM Database.EAI AS P WHERE P.MSG_ID = MSGID;

but hey, this does not work....anybody with any ideas?

Thanks
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
AkankshA
PostPosted: Mon Jul 21, 2008 1:27 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Not sure about if we can do it the way you want... I doubt rather..


another alternative could be ... get both the results from DB separately and then run a loop to set the env tree structure as u desired...

If the number of rows to be fetched is not large then it would not consume much time either...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » More than one select to update same var
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.