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: Decode equivalent within pl/sql?

Re: Decode equivalent within pl/sql?

From: Jeremy <jeremy0505_at_gmail.com>
Date: Mon, 13 Nov 2006 15:39:46 -0000
Message-ID: <MPG.1fc2a22014697c698a352@news.individual.net>


In article <45589050.8050101_at_arcor.de>, Maxim Demenko says...

> >
> >
> Well, for that purpose you can also use CASE direct within procedure
> call, like
>
> scott_at_CMS42DEV> exec dbms_output.put_line(a=>case when 1=1 then 'Hello'
> end);
> Hello
>
> PL/SQL procedure successfully completed.
>
> However, that will not probably shorten the code compared to IF ELSE...

Thanks - it does mean that one can avoid defining superfluous variables though.... but it could be less clear too. Real shame DECODE isn't available like that (perhaps 10g? - haven't looked).

-- 
jeremy
Received on Mon Nov 13 2006 - 09:39:46 CST

Original text of this message

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