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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DECODE being depricated???

Re: DECODE being depricated???

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Sat, 22 Feb 2003 10:55:49 -0800
Message-ID: <3E57C7B5.AC722029@exesolutions.com>


Lloyd Sheen wrote:

> Some info about both
>
> The CASE expression made its SQL debut in the SQL-92 specification in 1992.
> Eight years later, Oracle included the CASE expression in the 8.1.6 release.
> Like the DECODE function, the CASE expression enables conditional logic
> within an SQL statement, which might explain why Oracle took so much time
> implementing this particular feature. If you have been using Oracle for a
> number of years, you might wonder why you should care about the CASE
> expression, since DECODE does the job nicely. Here are several reasons why
> you should make the switch:
>
> a.. CASE expressions can be used everywhere that DECODE functions are
> permitted.
> b.. CASE expressions are more readable than DECODE expressions.
> c.. CASE expressions execute faster than DECODE expressions.1
> d.. CASE expressions handle complex logic more gracefully than DECODE
> expressions.
> e.. CASE is ANSI-compliant, whereas DECODE is proprietary.
> The only downside to using CASE over DECODE is that CASE expressions are not
> supported in Oracle8 i 's PL/SQL language. If you are using Oracle9 i ,
> however, any SQL statements executed from PL/SQL may include CASE
> expressions.
>
> The SQL-92 specification defines two distinct flavors of the CASE
> expression: searched and simple . Searched CASE expressions are the only
> type supported in the Oracle8 i release. If you are using Oracle9 i , you
> may also use simple CASE expressions.
>
> "DA Morgan" <damorgan_at_exesolutions.com> wrote in message
> news:3E565B0E.3E84349E_at_exesolutions.com...
> > Mike Cohen wrote:
> >
> > > Any idea why?
> > >
> > > Commencing in what version of Oracle?
> > >
> > > Man, just when I was getting good at it too!!! :(
> > >
> > > thanks,
> > >
> > > mike
> >
> > I've found no reference to this at otn.oracle.com. Can you point to a
> > reference?
> >
> > Thanks.
> >
> > Daniel Morgan
> >

Thanks ... nothing I didn't already know ... but unfortunately unresponsive to the intent of my question. Where is it documented that Oracle is deprecating DECODE? Daniel Morgan Received on Sat Feb 22 2003 - 12:55:49 CST

Original text of this message

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