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: Scott Kronheim <skronheim_at_synertechsystems.com>
Date: Tue, 01 Feb 2000 12:54:04 -0500
Message-ID: <38971DBC.FFCB03CE@synertechsystems.com>


Try:
  SELECT DECODE(CHAR_COLUMN, 'Y', 'Yes', 'No') FROM SOME_TABLE



Scott Kronheim

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

Original text of this message

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