Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to use 'Case' in Oracle 8i

Re: how to use 'Case' in Oracle 8i

From: pal <jayadevpaleri_at_gmail.com>
Date: Wed, 28 Nov 2007 03:51:40 -0800 (PST)
Message-ID: <cd8736ea-7711-4018-a333-9c1fe1b59c29@e10g2000prf.googlegroups.com>


On Nov 28, 1:49 pm, Carlos <miotromailcar..._at_netscape.net> wrote:
> On 28 nov, 08:19, DA Morgan <damor..._at_psoug.org> wrote:
>
>
>
>
>
> > pal wrote:
> > > On Nov 28, 9:06 am, DA Morgan <damor..._at_psoug.org> wrote:
> > >> pal wrote:
> > >>> On Nov 27, 11:00 am, DA Morgan <damor..._at_psoug.org> wrote:
> > >>>> pal wrote:
> > >>>>> Can any one tell me how can i use Case in Oracle 8i...
> > >>>>> thanks and regards
> > >>>> In SQL just use it.
> > >>>> In PL/SQL with native dynamic SQL.
> > >>>> Assuming, by 8i, you mean 8.1.7 and not 8.1.5.
> > >>>> --
> > >>>> Daniel A. Morgan
> > >>>> Oracle Ace Director & Instructor
> > >>>> University of Washington
> > >>>> damor..._at_x.washington.edu (replace x with u to respond)
> > >>>> Puget Sound Oracle Users Groupwww.psoug.org
> > >>> Morgan it is 8.1.5
> > >> Then it does not exist.
>
> > >> Are you aware of just how archaic 8.1.5 is? Let me help you if
> > >> you are not. It was introduced in 1999: 8 years ago. There are
> > >> children in 3rd grade that aren't as old as your software.
> > >> --
> > >> Daniel A. Morgan
> > >> Oracle Ace Director & Instructor
> > >> University of Washington
> > >> damor..._at_x.washington.edu (replace x with u to respond)
> > >> Puget Sound Oracle Users Groupwww.psoug.org-Hidequoted text -
>
> > >> - Show quoted text -
>
> > > Mr ,Morgan , whatever it is,
> > > i just want to know is there any alternative for this case statements,
> > > which i can use in 8.1.5
>
> > > cos some of out clients are still using the version,
> > > and according to their requirements i want to deliver the product.
>
> > Most of what people use CASE for can be done with DECODE. Look at the
> > examples in Morgan's Library atwww.psoug.orgunderDECODE and CASE.
> > Pay special attention to the use of SIGN in some of the demos.
>
> > It isn't pretty but it works very well.
> > --
> > Daniel A. Morgan
> > Oracle Ace Director & Instructor
> > University of Washington
> > damor..._at_x.washington.edu (replace x with u to respond)
> > Puget Sound Oracle Users Groupwww.psoug.org
>
> Keep in mind that DECODE and CASE are not *exactly* the same, for
> example: they treat the NULLs differently:
>
> http://carlosal.wordpress.com/2007/03/08/decode-case-y-nulls/
>
> HTH
>
> Cheers.
>
> Carlos- Hide quoted text -
>
> - Show quoted text -

can you tell me whether i can use DECODE in the below code---!

case when paywork.fxdded1 > 0 then

Case nat_cd when local_natcd Then

case
When nvl(jan_hallow,0) > 0 Then
(nvl(jan_basic,0) + nvl(jan_hallow,0)) * .11 Else
(nvl(jan_basic,0) + ((nvl(jan_basic,0) * 2)/12)) * .11 End

else (nvl(jan_basic,0) + ((nvl(jan_basic,0) * 2)/12) ) * .02  End

else 0

end Received on Wed Nov 28 2007 - 05:51:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US