Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sybase float vs Oracle binary_float data issue.

ora_12cSep 25 2014 — edited Oct 24 2014

Hello folks...when migrating data from sybase float to oracle binary_float having data differences in target. Binary_float decimal values not matching with inserted data.

Please refer below example to replicate this issue.

SYBASE 15.7: (Rapid Sql)  : Adaptive Server Enterprise/15.7/EBF 21770 SMP SP103 /P/Sun_svr4/OS 5.10/ase157sp101/3449/64-bit/FBO/Thu Sep 19 17:57:50 2013

create table tempdb..test_float_sybase ( col_value float) 

insert into tempdb..test_float_sybase(col_value) values (-190502.35000000001)

insert into tempdb..test_float_sybase(col_value) values (-190502.35)

insert into tempdb..test_float_sybase (col_value) values (-327939.82000000001)

insert into tempdb..test_float_sybase (col_value) values (-327939.82)

commit

select * from tempdb..test_float_sybase

col_value

-190502.35

-190502.35

-327939.82

-327939.82

ORACLE 12c (sql developer): Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0

create table oracle_bfloat  ( float_value   float, b_float_value binary_float) ;

insert into oracle_bfloat (float_value,b_float_value) values (-190502.35000000001,-190502.35000000001) ;
insert into oracle_bfloat (float_value,b_float_value) values (-190502.35,-190502.35) ;

insert into oracle_bfloat (float_value,b_float_value) values (-327939.82000000001,-327939.82000000001) ;
insert into oracle_bfloat (float_value,b_float_value) values (-327939.82,-327939.82) ;

commit;

select * from oracle_bfloat

FLOAT_VALUE                  B_FLOAT_VALUE

-190502.35000000001       -190502.34

-190502.35                        -190502.34

-327939.82000000001        -327939.8

-327939.82                         -327939.8

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2014
Added on Sep 25 2014
6 comments
2,099 views