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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Generating Binary Column

Re: Generating Binary Column

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 12 Feb 2001 06:12:43 +0100
Message-ID: <t8gd4112m46h58@beta-news.demon.nl>

Use the sign(x-5) construct in your decode.

Hth,

Sybrand Bakker, Oracle DBA

<nevergiveup_at_my-deja.com> wrote in message news:967b2j$ssd$1_at_nnrp1.deja.com...
> Hello,
>
> I have Table T with Column X.
> I want to generate Column Y in the same table, or in the new view V.
>
> I want Y to have the value of 1 if X >= 5, and 0 if otherwise.
>
> How would I do this?
> I have been looking into Decode, and it doesn't seem to do it.
> I think Decode only works for text matching.
>
> Thank you,
>
> Gingko
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Sun Feb 11 2001 - 23:12:43 CST

Original text of this message

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