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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Ternary '?' in (PL/)SQL

Re: Ternary '?' in (PL/)SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 01 Feb 2000 11:46:50 -0500
Message-ID: <9f3e9ss7d8k3mpa8csv3g8h48cjsmh4m5u@4ax.com>


A copy of this was sent to david_barts_at_my-deja.com (if that email address didn't require changing) On Tue, 01 Feb 2000 16:15:05 GMT, you wrote:

>Is there a way to simulate the '?' operator of C-like
>languages, e.g:
>
>select (char_column == 'Y' ? 'Yes' : 'No') from some_table
>where ... ;
>

select decode( char_colunn, 'Y', 'Yes', 'No' ) from some_table

>Thanks!
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Feb 01 2000 - 10:46:50 CST

Original text of this message

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