SQL Language (MOSC)

MOSC Banner

Round() function discrepancy: bug or intended functionality?

edited May 6, 2011 6:39AM in SQL Language (MOSC) 5 commentsAnswered
Hi,

One of our developers showed me the following discrepancy with the ROUND() function. The only difference that I can see is when the input value to the round() function is derived from a math operation. I'd just like to know, is this a bug or if it is intended functionality?

SQL> select * from v$version;

BANNER                                                                         
----------------------------------------------------------------               
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi               
PL/SQL Release 10.2.0.4.0 - Production                                         
CORE 10.2.0.4.0 Production                                                     
TNS for Linux: Version 10.2.0.4.0 - Production                                 
NLSRTL Version 10.2.0.4.0 - Production                                         

SQL> @c:\dos\OracleRoundingDiscrepancy\OracleRoundingDiscrepancyTest.sql
SQL> create table test_values (numb number);

Table created.

SQL>
SQL> insert into test_values (numb) values (-92.75);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center