decode (column_name, value, replacement, value, replacement,....
default)

where value is the column value 
replacement is value you want to replace the column value with
default is the value to use if you get a column value not in your list

decode (operating_system, 'PC','Windows','SUN','UNIX','LINUX')


so if the operating_system column has the value PC, you want to have
Windows as the value you actually get,if it has SUN you get UNIX, if it
has anything else you will see LINUX


--- Ruth Gramolini <[EMAIL PROTECTED]> wrote:
> Hello everyone,
> 
> I am having a senior moment and I have forgetten the syntax for
> 'decode'.
> Can anyone give me a hint.  I have leant out my sql books and of
> course I
> need them now.
> 
> Thanks in advance,
> Ruth Gramolini
> Oracle DBA, Vermont Department of Taxes
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Ruth Gramolini
>   INET: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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).


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to