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 » Usage of SELECT statement in ESQL

Post new topic  Reply to topic
 Usage of SELECT statement in ESQL « View previous topic :: View next topic » 
Author Message
ragi_kmm
PostPosted: Wed Feb 06, 2013 4:39 am    Post subject: Usage of SELECT statement in ESQL Reply with quote

Novice

Joined: 19 Sep 2006
Posts: 13

Hi MQSeries.net users

I am calling a DB stored proc to get the results in to Environment variable.
Later I am using SELECT statement to assign the result set (from Env variable) to the Output Root.

For suppose, there are 50 fields in the result set.
my requirement is:
If "A" then Populate all 50 fields
ELSE
Populate only 40 fields.

I m trying to understand if there is a way to include this logic while retriving the records from Env variable using SELECT function?

Thank you for your replies
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Wed Feb 06, 2013 4:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you assign the result set to the output root, how will it possibly create more fields than exist in the result set?
Back to top
View user's profile Send private message
ragi_kmm
PostPosted: Wed Feb 06, 2013 4:43 am    Post subject: Reply with quote

Novice

Joined: 19 Sep 2006
Posts: 13

Sorry, I believe, my post is not clear

Yes, Result set has all the 50 fields (SP returns 50 fields)
Btw, I m using WMB 8
_________________
Best Regards,
Giri
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Wed Feb 06, 2013 4:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Either you are still being very unclear, or you are missing something basic.

ESQL is a programming language.

You can write any kind of programming logic you want in it.

You can choose to write individual SET statements to set fields individually or you can use certain kinds of constructs to assign many fields at once.

You can choose to set fields in four entirely separate places within a compute node - in the OutputRoot, in the OutputLocalEnvironment, in the OutputEnvironment, or in any variables you have declared yourself.
Back to top
View user's profile Send private message
McueMart
PostPosted: Wed Feb 06, 2013 4:58 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

I believe the OP is looking for a similar capability to the LIMIT function of normal SQL. I don't believe this can be used when selecting out of a message tree.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 06, 2013 5:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

McueMart wrote:
I believe the OP is looking for a similar capability to the LIMIT function of normal SQL. I don't believe this can be used when selecting out of a message tree.


Ok. OP is also mentioning an SP - presumably a 'stored procedure'. In theory this should be able to implement the necessary LIMIT.



Otherwise, there are clearly plenty of ways to do conditional mapping in ESQL.
Back to top
View user's profile Send private message
ragi_kmm
PostPosted: Wed Feb 06, 2013 6:42 am    Post subject: Reply with quote

Novice

Joined: 19 Sep 2006
Posts: 13

thanks for the replies.

Yes, we have used normal mapping earlier, which works very well.
we had performance issues, so we have opted to use SELECT statement.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Usage of SELECT statement in ESQL
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.