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: Decode in PL/Sql

Re: Decode in PL/Sql

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Thu, 17 May 2001 06:40:46 -0700
Message-ID: <F001.0030612B.20010517054542@fatcity.com>

Gyula,

I understand, that you want to apply DECODE function to some local variables in your pl/sql block (and not to some columns in some table).

The trick is: you can always run DECODE() against 'dual' table:

select DECODE(base_expr, compare1, value1, compare2, value2,... default ) into local_variable_out from dual;

In this case 'base_expr' does not have to reference any column in any table.

Igor Neyman, OCP DBA
Perceptron, Inc.
(734)414-4627
ineyman_at_perceptron.com

> Hi Gurus !
>
>
> Is there any function that can be used in PL/SQL and just works the way
as
> DECODE does in Sql?
>
> Thanks in Advance
>
> Gyula
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Andor, Gyula
> INET: gy.andor_at_euromacc.hu
>
> 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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Igor Neyman
  INET: ineyman_at_perceptron.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 Thu May 17 2001 - 08:40:46 CDT

Original text of this message

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