Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Decode equivalent within pl/sql?
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).
-- jeremyReceived on Mon Nov 13 2006 - 09:39:46 CST