Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: decimal to binary masks
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
![]() |
![]() |