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: Basic DECODE Question.....

Re: Basic DECODE Question.....

From: FC <flavio_at_tin.it>
Date: Thu, 20 Feb 2003 08:58:43 GMT
Message-ID: <7N05a.205227$0v.5754979@news1.tin.it>

"Billy Verreynne" <vslabs_at_onwe.co.za> wrote in message news:b320r0$9n5$1_at_ctb-nnrp2.saix.net...
>
> CASE also works with Oracle 8.1.7 (and likely thus with all 8 versions).
>

Little correction:
it works in SQL, but it doesn't in PL/SQL.

SQL: Select case when VAL>0 then 1

                                                    else 0 end
                from dual;    -- ok

PLSQL:  Begin
               Select case when VAL>0 then 1
                                                       else 0 end
                  into var
                  from dual;    -- Parsing error
              End;

I wonder why DECODE is deprecated, go figure.

Bye,
Flavio Received on Thu Feb 20 2003 - 02:58:43 CST

Original text of this message

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