Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL and boolean stuff
"Syltrem" <syltremzulu_at_videotron.ca> wrote in message
news:mlO%b.357$Xy3.1178_at_tor-nn1.netcom.ca...
> 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 +
>
> --
> Syltrem
>
> OpenVMS 7.3-1 + Oracle 8.1.7.4
> http://pages.infinit.net/syltrem (OpenVMS related web site, en français)
> ---zulu is not in my email address---
>
Yes, if you can not use CASE, do it this way:
select
decode(
sign (column1 - 10) ,1, 'Greater_then_VAL' ,0, 'Equal_VAL' ,-1, 'Less_then_VAL')
You can set GT and LT and EQ to what you want....in your case
GT and LT would be 'FALSE' and EQ would be 'TRUE' Received on Mon Mar 01 2004 - 14:11:47 CST