Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Ternary '?' in (PL/)SQL
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
![]() |
![]() |