RE: bitand functions and NUMBER(20)
- From: <Joel.Patterson@xxxxxxxxxxx>
- To: <mwf@xxxxxxxx>, <skuhn@xxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 19 Jul 2007 11:18:37 -0400
Hmmmn, My database returns a different answer than MySQL.
DBMON @ lawprd81> column temp format
9999999999999999999999999999999999999999999999999
DBMON @ lawprd81> select
bitand(10846370260800065548,9368617832122679304) temp from dual;
TEMP
--------------------------------------------------
9223372036854775807
Joel Patterson
Database Administrator
joel.patterson@xxxxxxxxxxx
x72546
904 727-2546
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mark W. Farnham
Sent: Thursday, July 19, 2007 9:30 AM
To: skuhn@xxxxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: RE: bitand functions and NUMBER(20)
I'm curious how you're establishing the value that Oracle is returning.
This could possibly just be a problem with the column format not being
wide
enough for a fully expressed displayed answer.
Regards,
mwf
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Stefan Kuhn
Sent: Thursday, July 19, 2007 8:18 AM
To: oracle-l@xxxxxxxxxxxxx
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@xxxxxxxxxxxx Tel. +49 (0) 345 5582 1474 Fax.+49 (0) 345 5582 1409
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
- References:
- RE: bitand functions and NUMBER(20)
- From: Mark W. Farnham
Other related posts:
- » bitand functions and NUMBER(20)
- » RE: bitand functions and NUMBER(20)
- » Re: bitand functions and NUMBER(20)
- » RE: bitand functions and NUMBER(20)
- » Re: bitand functions and NUMBER(20)
- » RE: bitand functions and NUMBER(20)
- » Re: bitand functions and NUMBER(20)
- » RE: bitand functions and NUMBER(20)
- » RE: bitand functions and NUMBER(20)
- RE: bitand functions and NUMBER(20)
- From: Mark W. Farnham