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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Arithmetic and (&) bitmap comparison

RE: Arithmetic and (&) bitmap comparison

From: MacGregor, Ian A. <ian_at_SLAC.Stanford.EDU>
Date: Thu, 22 Jun 2000 22:07:29 -0700
Message-Id: <10536.110218@fatcity.com>


BIT_AND Function

This function performs bitwise logical "and" of the values in RAW r1 with RAW r2 and returns the
"anded" result RAW.

If r1 and r2 differ in length, then the "and" operation is terminated after the last byte of the shorter of
the two RAWs, and the unprocessed portion of the longer RAW is appended to the partial result. The
result length equals the longer of the two input RAWs.

Syntax

UTL_RAW.BIT_AND (
   r1 IN RAW,
   r2 IN RAW)
  RETURN RAW; Ian MacGregor
Stanford Linear Acclerator Center
ian_at_slac.stanford.edu

-----Original Message-----
From: Lucia DeMeester [mailto:ldemeester_at_nm2.com] Sent: Thursday, June 22, 2000 4:28 PM
To: Multiple recipients of list ORACLE-L Subject: Arithmetic and (&) bitmap comparison

Does any one know whether Oracle supports arithmetic &. We are converting Sybase to Oracle. In sybase, my analyst has the follow codes it was working but he gets error when accessing Oracle.

select * from orders
where store_id = 'A'
  and status > 255
  and status & (256+128) = 256
order by order_date desc

but it's complaining

ERROR at line 4:
ORA-00920: invalid relational operator

The data type for status is number in Oracle.

Thanks!!

Lucia

-- 
Author: Lucia DeMeester
  INET: ldemeester_at_nm2.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jun 23 2000 - 00:07:29 CDT

Original text of this message

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