Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2005, 01:38 AM
Authorized User
 
Join Date: May 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to saravananedu
Default Number(20,2) Rounding off Problem

Dear All,

I have a problem while trying to store a big value in number datatype.

I have a column of type number(20,2). so we can give precision 18 and scale 2 (in oracle). while im trying to insert 18 precision and 2 scale as 123456789012345678.99, it is automatically converting to 1.23456789012346E17. so even when im trying to retrieve by using the following query:

"select to_char(billed_threshold,'999999999999999999.99') from claim_line"

im getting only 123456789012346000.00 (the fourth precision from the right getting rounded and the remaiing becomes zero). How to go about that. I want to store and retrieve as it is. i can not change the datatype to varchar2 now, because it is already documented to client.

(its working fine till 1234567890123.99. ie., till number(15,2) its ok)

Please help me to sort out this issue.

Thanks in advance.

Best Regards,
A. Saravanan.
__________________
Best Regards,
Saran.
 
Old October 8th, 2005, 11:10 PM
Registered User
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
i tried your problem in Oracle 9i and its working just fine and giving the exact precision you want, which version of Oracle are you using.

Regards
M






Similar Threads
Thread Thread Starter Forum Replies Last Post
Rounding to the nearest multiple of a number andyashton XSLT 2 October 10th, 2008 11:08 AM
Chapter 20 Problem with PictureInfo joergUmbricht BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 September 30th, 2007 02:57 AM
Rounding problem rajanikrishna Classic ASP Basics 1 August 17th, 2006 12:14 AM
Problem with Action Mappings in Chps. 19-20 michaeldill JSP Basics 0 April 13th, 2004 02:29 PM
TCPSend/ Receive system.dll problem (ch 20) dingke BOOK: Professional C#, 2nd and 3rd Editions 0 March 10th, 2004 05:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.