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 - search condition in CASE statement

Post new topic  Reply to topic
 ESQL - search condition in CASE statement « View previous topic :: View next topic » 
Author Message
Nick Lethbridge
PostPosted: Fri Aug 31, 2001 11:39 am    Post subject: Reply with quote

Voyager

Joined: 13 Aug 2001
Posts: 88
Location: Santander, UK

I specified the following within an ESQL script for a Compute node:

CASE ...............
WHEN '1' OR '2' OR '4' etc.... THEN ....
END;

Although the syntax checker accepted it, when I tried to deploy the message flow it was rejected (did not expect the first OR to be there).

I ended up having to enter n lines of:
WHEN '1' THEN ....
WHEN '2' THEN ....
WHEN '4' THEN ....
etc.

Does anyone know of a way that you can specify a list of values (or a range of values) in a single search condition for a CASE statement ?

Nick
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Fri Aug 31, 2001 3:26 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Unfortunately, what you are asking for will not work. The syntax of the CASE statement seems to show that the part following WHEN has to be an expression. By using OR or '|' or other syntactical contructs, it would appear that you are creating a predicate... i.e. something which is true or false and not something which evaluates to a value.
Back to top
View user's profile Send private message
wmbv7newbie
PostPosted: Tue Mar 24, 2015 12:05 am    Post subject: Reply with quote

Centurion

Joined: 13 May 2014
Posts: 121

Could anybody come with a solution to this? I am facing the same problem and have to write 7 WHEN with CASE although it could have been done in 3 if OR were allowed
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Mar 24, 2015 1:23 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Your solution is here

http://www.mqseries.net/phpBB2/viewtopic.php?p=337106
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
wmbv7newbie
PostPosted: Tue Mar 24, 2015 1:33 am    Post subject: Reply with quote

Centurion

Joined: 13 May 2014
Posts: 121

Works! Thanks

Out of curiosity, how do you people find the right threads so quickly, however old? I tried doing a search of text and I got hundreds of links in response. Thought it better to post the question here.

Some algorithm in place?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Mar 24, 2015 1:43 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

This one was easy for me to find because I opened the thread I linked to.

I searched for 'SMDavies99 CASE'
and there is was at the top of the list.

Memo to self.... Need to update my list of 'really useful threads'.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » ESQL - search condition in CASE statement
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.