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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: range checking ??? URGENT

Re: range checking ??? URGENT

From: Robert Pegram <pegramrg_at_yahoo.com>
Date: Wed, 14 Nov 2001 19:10:36 -0800
Message-ID: <F001.003C5584.20011114181519@fatcity.com>

If you are on 8i (I know it works on 8.1.6 and 8.1.7), you can use select case:

SQL> select * from junk;

         X


        10
        15
        20
        25

SQL> select x, (case when x < 11 then 'small' when x < 21 then 'med' when x < 31 then 'large' end) from junk   2 /

         X (CASE
---------- -----

        10 small
        15 med
        20 med
        25 large

SQL> HTH Rob Pegram
Oracle Certified DBA


Do You Yahoo!?
Find the one for you at Yahoo! Personals http://personals.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Robert Pegram
  INET: pegramrg_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Nov 14 2001 - 21:10:36 CST

Original text of this message

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