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: bitand functions and NUMBER(20)

RE: bitand functions and NUMBER(20)

From: Kerber, Andrew W. <Andrew.Kerber_at_umb.com>
Date: Thu, 19 Jul 2007 07:44:53 -0500
Message-ID: <D40740337A3B524FA81DB598D2D7EBB3097A8777@x6009a.umb.corp.umb.com>


I have to ask this question because no one has yet given me an answer. Why do you use an Oracle database to store bitwise data? Any performance gain you might possible get by doing bitwise operations is going to be completely overshadowed by the retrieval time from the database.

-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Stefan Kuhn Sent: Thursday, July 19, 2007 7:18 AM
To: oracle-l_at_freelists.org
Subject: bitand functions and NUMBER(20)

Hi all,
I have got a column defined as NUMBER(20) and want to use bit functions on it. It seems that oracle bitand function is restricted in length. To give an example:
select bitand(10846370260800065548,9368617832122679304) from TABLE; returns 9.2234E+18, although the second figure is a subset of bits in first figure. So result should be 9368617832122679304. To make sure my figures are right, I did select 10846370260800065548 & 9368617832122679304; in Mysql and it gave 9368617832122679304. The problem does arise with figures of a certain length. What to do best (apart from changing the column type, which I would like to avoid)?
I hope the question isn't too trivia...
Stefan
--

Stefan Kuhn BSc MA
IPB Halle
AG Bioinformatik & Massenspektrometrie
Weinberg 3
06120 Halle
http://www.ipb-halle.de http://msbi.bic-gh.de skuhn_at_ipb-halle.de Tel. +49 (0) 345 5582 1474 Fax.+49 (0) 345 5582 1409
--

http://www.freelists.org/webpage/oracle-l



NOTICE: This electronic mail message and any attached files are confidential. The information is exclusively for the use of the individual or entity intended as the recipient. If you are not the intended recipient, any use, copying, printing, reviewing, retention, disclosure, distribution or forwarding of the message or any attached file is not authorized and is strictly prohibited. If you have received this electronic mail message in error, please advise the sender by reply electronic mail immediately and permanently delete the original transmission, any attachments and any copies of this message from your computer system. Thank you.

--

http://www.freelists.org/webpage/oracle-l Received on Thu Jul 19 2007 - 07:44:53 CDT

Original text of this message

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