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: Carlos <miotromailcarlos_at_netscape.net>
Date: Wed, 28 Nov 2007 00:49:11 -0800 (PST)
Message-ID: <6714a476-3b45-4873-af03-ba86620e6b9f@b40g2000prf.googlegroups.com>


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-Hide quoted 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.orgunder DECODE 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 Received on Wed Nov 28 2007 - 02:49:11 CST

Original text of this message

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