473,388 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Decimal data creation Number datatype

In Oracle 9i, i have created a decimal value using Number datatype as NUMBER(17,5). I am storing the value as 999999999999.99. When i retrive this, it gives 999999999999.99002. When i store 999999999999.999, and retrieve, it gives 999999999999.99898. How does it happen? Why the value changes ? Please explain me. Thanks in advance.
Dec 21 '07 #1
2 5007
Dave44
153 100+
In Oracle 9i, i have created a decimal value using Number datatype as NUMBER(17,5). I am storing the value as 999999999999.99. When i retrive this, it gives 999999999999.99002. When i store 999999999999.999, and retrieve, it gives 999999999999.99898. How does it happen? Why the value changes ? Please explain me. Thanks in advance.
How are the values being stored; are you sure those are the values being placed there? are there any underlying triggers or running jobs that modify the data after its inserted? what are you viewing it with, is it "formatting" it somehow?

in your dev environment create a table with a number (17,5) column and insert the number values you have shown and then select them. they should be no different.

there are many "things" that could cause what your seeing but the database itself will not modify a value you give it to store.
Dec 22 '07 #2
amitpatel66
2,367 Expert 2GB
In Oracle 9i, i have created a decimal value using Number datatype as NUMBER(17,5). I am storing the value as 999999999999.99. When i retrive this, it gives 999999999999.99002. When i store 999999999999.999, and retrieve, it gives 999999999999.99898. How does it happen? Why the value changes ? Please explain me. Thanks in advance.
It could be very heplful if you could provide us the sample data and the way you are retrieving the data from the table??
Dec 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing/modifying the code. Thank you. .. Facundo
17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
6
by: Chris Kennedy | last post by:
I am pulling a decimal value from SQL server and trying to use the format currency and format number function. I am using these values in a large string of HTML to be used in a CDONTS Email. If I...
1
by: Tariq | last post by:
I've a SQL view performing a number of very precise calculations ie. 495/(1.112 - (.00043499*((Col1 + Col2 + Col3))) + ( .00000055 * ((Col1 + Col2 + Col3)) * ((Col1 + Col2 + Col3))) - (.00028826...
4
by: Mark | last post by:
We have a SQL Server table with a decimal column that is not required. We're building a .NET application for data entry. If the value is optional, but a decimal is strongly typed in C# and cannot...
18
by: Kuljit | last post by:
I am doing Engineering(B.Tech) in Computer Science. I have a question for which i am struggling to write a C code(program). It struck me when we were being taught about a program which counts the...
11
by: Pieter | last post by:
Hi, I'm having some troubles with my numeric-types in my VB.NET 2005 application, together with a SQL Server 2000. - I first used Single in my application, and Decimal in my database. But a...
1
by: Aaron Prohaska | last post by:
Good morning everyone, I'm having problems when I convert the SQL Server datatype smallmoney to the .net datatype decimal. I am doing this to pass a dollor amount to the Verisign payment...
2
by: pvong | last post by:
Newbie learning VB.Net. I have a simple DataReader and I can grab the info. The data is in numeric format like 123.99 and I want a TextBox to just display it just like that. When I use the code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.