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: Is there a CASE statement in PL/SQL?

Re: Is there a CASE statement in PL/SQL?

From: Raxie <raxie_at_aol.com>
Date: 1997/07/29
Message-ID: <19970729174800.NAA10860@ladder02.news.aol.com>#1/1

Try

SELECT TO_CHAR(indate, 'D') into day_number,

                DECODE( TO_CHAR(indate,'D'),2,0,
                                            3,1
                                            4,2
                                            5,3
                                            6,4
                                            7,5
                                            1,6,
                                            NULL /* Defaultt VAlue*/)
                    into minus_days

 from DUAL;    Received on Tue Jul 29 1997 - 00:00:00 CDT

Original text of this message

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