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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL and boolean stuff

Re: SQL and boolean stuff

From: Bricklen <bricklen-rem_at_yahoo.comz>
Date: Fri, 27 Feb 2004 21:12:59 GMT
Message-ID: <vpO%b.91462$Hy3.82022@edtnps89>


Syltrem wrote:

> Hi
>
> Is it possible to do something like this:
>
> select decode(1=1, true, 'true', 'false') from dual;
>
> instead of 1=1, in real life I would do something like "colum1 < 10" or
> "column2 > 'G'", for example
>
> I don't want to have to write a function, etc.
> I just want to know if getting a true or false boolean value is possible
>
> Thanks for suggestions
> Oracle 817 or +
>

Why not use a CASE statement?
select case when col1 < 10 or col2 > 'G' then <do something> else <do something else> end
from dual; Received on Fri Feb 27 2004 - 15:12:59 CST

Original text of this message

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