|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CASE Statement |
« View previous topic :: View next topic » |
Author |
Message
|
Sridar |
Posted: Mon Oct 23, 2006 4:36 am Post subject: CASE Statement |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Hi
I am using a Case structure.
In this for 2 particular conditions i want to use the same code.
i.e. 2 conditions solve same functionality.
I set the value of the 2 conditions to a variable and used it in the case statement, but i want to know if there is a direct way of doing it while using a case structure(something like an 'OR' of the conditions)
The following is the requirement
Quote: |
CASE
WHEN ACT_UPDT THEN
STMTS1
WHEN ACT_INSRT THEN
STMTS2
WHEN ACT_DEL THEN
STMTS2
|
_________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 23, 2006 4:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
Sridar |
Posted: Mon Oct 23, 2006 4:55 am Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Thanks jeff
I also use the same documentation but it does not specify about combining of two conditions. _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 23, 2006 5:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, it really does.
It says that the WHEN clause takes an Expression.
It also says that
Quote: |
In the searched form, each WHEN clause expression is evaluated in turn until one evaluates to TRUE. That WHEN clause's statements are then executed. |
And you're using the searched form, because you don't specify an expression on the CASE, just on the WHENs. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|