Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Ternary '?' in (PL/)SQL
Try:
SELECT DECODE(CHAR_COLUMN, 'Y', 'Yes', 'No') FROM SOME_TABLE
david_barts_at_my-deja.com 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 ... ;
>
> Thanks!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Feb 01 2000 - 11:54:04 CST
![]() |
![]() |