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

Home -> Community -> Usenet -> c.d.o.server -> Re: Bitwise operator in PL/SQL

Re: Bitwise operator in PL/SQL

From: Mark Merritt <merritt_at_mail.msen.com>
Date: 1997/10/29
Message-ID: <638ie6$b7e$1@ink.msen.com>#1/1

Haresh Assumal (assumal_at_sprynet.com) wrote:
: Hi,
: Does anyone know if there is a bitwise operator in PL/SQL. I need to
: compare bits in a number field, Eg if i=3 (101 binary) and j=1 then i AND j
: = 1, if k=2 (010 binary) then i AND k = 0.
: What I am looking for is the bitwise AND operator.
:
: Thanks,
: Haresh

?/rdbms/admin/standard.sql defines the following:

  function BITAND (LEFT binary_integer, RIGHT binary_integer)

        return binary_integer;

Not to be a smart-ass, but I strongly suggest you do further study of binary numbers before proceeding!

/*+ Opinions expressed here do not necessarily represent those of

    Oracle Corporation!
*/ Received on Wed Oct 29 1997 - 00:00:00 CST

Original text of this message

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