Re: bitwise and

From: Tony Jambu <aaj_at_cmutual.com.au>
Date: Tue, 14 Jun 1994 05:52:58 GMT
Message-ID: <CrDHoB.11q_at_cmutual.com.au>


Glen

In article <1994Jun10.212651.7737_at_instep.wimsey.bc.ca>, glen_at_instep.wimsey.bc.ca writes:
> Does oracle support a bitwise and function for integers?
>
> I have heard of a undocumented bitand() function. Is this what I am
> looking for? I don't have access to an oracle server at the moment,
> so I can't try it.

You are right. Have a look at the following statement that Oracle uses:

select nconam, ncouid, decode(bitand(hstflg, 32), 0, 'NO', 'YES'),

       decode(bitand(hstflg, 8), 0, 'NO', 'YES'),
       decode(hstpro, 1, 'V5', 2, 'V6', 3, 'V6_NLS', 4, 'V7', 'UNKN'),
       ncouct, decode(bitand(ncoflg, 2), 0, 'NO', 'YES'),
       decode(bitand(ncoflg, 8), 0, 'NO', 'YES'), nco2pstr
from x$uganco where bitand(hstflg, 1) != 0

Hope that helps

ta
tony

-- 
 _____       ________ / ____ |Tony Jambu, Database Administrator
  /_  _        /_ __ /       |Colonial Mutual Invest Mgmt,Aust (ACN004021809)
 /(_)/ )(_/ \_/(///(/_)/_(   |EMAIL: TJambu_at_cmutual.com.au
 \_______/                   |PHONE: +61-3-2831639       FAX: +61-3-2831090
Received on Tue Jun 14 1994 - 07:52:58 CEST

Original text of this message