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: decimal to binary masks

Re: decimal to binary masks

From: Elrond <elrond_at_icn.pl>
Date: Wed, 9 Feb 2000 10:05:11 +0100
Message-ID: <87rao5$q8k$1@helios.man.lublin.pl>


Hmmm i had have the same problem. You can write your own dll with functions doing this.
Or (i did this but it's an early alpha version) you can write function which converts the number to a binary "string", then you can see if the second char is 1 or 0.
maciej myrcha
"Steve A" <spectre_at_hkstar.com> wrote in message news:1e5qhum.1116aws1u15z3gN@[192.168.2.50]...
> Hi,
> I want to test for a given bit being set.
> for example a number field being used as flag storage.
> 0=no lock
> 1=invoiced_locked
> 2=shipping_locked
> 4=packing_locked
> etc
>
> if bitset(flag,2)
> then
> .....
> else
> XXXXX
> endif
>
> I don't want to have to use UTL_RAW, since it seems to only work on
> varchar2 & rawtypes
>
> any routines out there
>
>
> steve
>
Received on Wed Feb 09 2000 - 03:05:11 CST

Original text of this message

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