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 » esql query help

Post new topic  Reply to topic
 esql query help « View previous topic :: View next topic » 
Author Message
mirakal
PostPosted: Thu Dec 13, 2007 8:26 am    Post subject: esql query help Reply with quote

Novice

Joined: 19 Sep 2007
Posts: 11

Hi ,

Need some basics on query in esql.

Scenario:

IF((SELECT COUNT(*) FROM Database.Column1 AS T

WHERE T.YYY = InputRoot.XML.YYY) )

THEN

UPDATE Column2
T.WWW=InputRoot.XML.WWW
Where T.YYY= InputRoot.XML.YYY
T.PPP=InputRoot.XML.PPP



Need this kind of query in general form.The two columns 1 & 2 has almost same information but column 2 has extra info,which needs to be updated only when I get the status from from column1(under the condition T.YYY=InputRoot.XML.YYY ) ,if not no action on column2.It would be great if you can help me on this today.Thanks
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Dec 13, 2007 11:22 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mirakal,

Your IF condition is not checking the Selected value against the InputRoot YYY value....instead it is simply returning an integer....I hope this is not your code and that you are only trying to make us understand your issue...

Why don't you simply do an UPDATE with the WHERE clause....in this way you can avoid doing a SELECT and then an UPDATE....instead the update will only occur when the condition YYY = InputRoot.XML.YYY matches.

Regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » esql query help
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.