Re: Oracle CASE

From: ddf <oratune_at_msn.com>
Date: Tue, 24 Feb 2009 07:51:54 -0800 (PST)
Message-ID: <b0dd53e9-667e-4660-9d7e-c8a44429f400_at_f18g2000vbf.googlegroups.com>


On Feb 24, 8:07 am, Mtek <m..._at_mtekusa.com> wrote:
> On Feb 23, 3:35 pm, Gints Plivna <gints.pli..._at_gmail.com> wrote:
>
>
>
>
>
> > On 23 Febr., 20:30, Mtek <m..._at_mtekusa.com> wrote:> Can you have multiple conditions in the WHEN clause of a CASE
> > > statement?
>
> > >    CASE v_subproduct_id
> > >    WHEN 197 OR 95 THEN
>
> > either
>
> > case v
> > when 197 then 'x'
> > when 95 then 'x'
> > end
>
> > Or
> > case when v = 197 or v = 95 then 'x'
> > end
>
> > Gints Plivnahttp://www.gplivna.eu
>
> Well, both the 197 & 95 will execute the same code, there is no reason
> to code them separately......so, I guess #2 is the way to go.  I just
> hate having to re-state the variable I am testing over and over again
> in each condition......- Hide quoted text -
>
> - Show quoted text -

Is there nothing in Oracle about which you won't complain?

David Fitzjarrell Received on Tue Feb 24 2009 - 16:51:54 CET

Original text of this message