Re: Get Count of Decimal Places
Date: Thu, 13 Mar 2008 11:20:31 -0700 (PDT)
On Mar 13, 10:55 am, webtourist <webtour..._at_gmail.com> wrote:
> I have some number data in table like this:
> i.e. very large decimal places..
> I'd like to update them and ROUND them all to 8th decimal.
> How to get the number of decimal places ? or I have to do this via
> to_char, substr etc....
Oracle has a particular definition for storing numeric values. Normally, one keeps the value precisely, then rounds particularly during manipulation or display. But you might have some particular requirement, so perhaps you should say what it is. I've seen quite a bit of ridiculous argument as users don't understand when and where rounding should be done, especially when they have wrong formulae with Excel spreadsheets, and it always winds up coming back to me to explain why the db is right and their spreadsheets are wrong.
SQL has a round function:
The Concepts manual explains your options: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#sthref3810
The SQL manual also describes the datatype in more detail: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#sthref87
You should learn to search the manuals at http://tahiti.oracle.com
-- @home.com is bogus. '...unsolicited suggestions you "feel are helpful" are helpful only to your sense of superiority. You're not alone in this, either. Your "helping" impulse and your sister's resistance both originate in the same human need: to matter. The only way you're going to change this habit is to know this impulse for what it is. Recognize it so you can be more conscious of the ways you choose to assert yourself, and do so only when it's your business to (the oversimplified version: when it's about you; when you're asked; in emergencies). That's the only time it's appropriate, and also, conveniently, the only time it actually works. Put your "nitpicking" to that test and I think you'll see how freely, and wrongly, your attempts to help have crossed these boundaries. This is the light that will show you the limits next time. ' - "Carolyn Hax"Received on Thu Mar 13 2008 - 13:20:31 CDT