Fixed decimal digits using to_number

Hi,
I have few values in table like 10.3, 20.10, 30.37,40. But I need to select always with 2 decimal points. can anyone help me to achieve this?
i.e I want the values to be retrieved as
10.30
20.10
30.37
40.00
Thanks in advance

Hi,
If your number are actually strings then try:
MHO%xe> with t as ( -- generating sample data:
  2  select '10.3' col from dual union all
  3  select '20.10' from dual union all
  4  select '30.37' from dual union all
  5  select '40.' from dual
  6  )
  7  --
  8  -- actual query:
  9  --
10  select to_char(to_number(col), '99D00')
11  from   t;
TO_CHA
10.30
20.10
30.37
40.00else try:
select to_char(col, '99D00')
from   t;See:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions199.htm#SQLRF06130

Similar Messages

  • 15 int digits and 3 decimal digits number problem in CR for VS 2005

    Post Author: condeagustin
    CA Forum: Crystal Reports
    HiIm using the Crystal Reports that comes with VS 2005 and I'm having a problem showing a number with 15 int digits and 3 decimal digits. In my tests, for example I have a formula that only has this line of code:  356125478123456.251I want the report to show  356,125,478,123,456.251 but it shows  356,125,478,123,456.000Why does CR puts 000 when it has to be a 251!!! WHY?!!!! I have tried to put the number as a string and I have tried a lot of functions like Round, Truncate, ToText, CDbl, etc and it's always the same result. In the format object of that formula the decimals are 1.000 and the rounding is 0.001. And the following is the weirdest part:If, instead of 356125478123456.251 I put 56125478123456.251, CR shows 56,125,478,123,456.300If then I put  6125478123456.251 CR shows 6,125,478,123,456.250And then if I put 125478123456.251 CR SUCCESFULLY shows 125,478,123,456.251 That is the way I want it but with 15 int digits. It looks like CR only works with a maximum of 12 int digits, more than that, the decimals don't work. How can I fix this? Please help me!Kind regards,Agustín Conde 

    Post Author: Ken Wong
    CA Forum: Crystal Reports
    Hi Agustin,
    Crystal Reports uses signed doubles as its datatype for numbers.  A signed double on a 32 bit machine is represented by 8 bytes.  1 sign bit, 11 exponent bit, and 52 bit for the mantissa. This roughly corresponds to 15 digits of total precision in decimal; ie. it does not matter where your dot is. You have 15 digits before and after the decimal point combined.
    This behavior is pretty standard.  You should see similar behavior in applications such as excel.
    Hope this helps,
    Ken

  • Fixed Decimal Input

    I am looking for a setting for fixed decimal places.  Most of my data is entered in excel, currently, as 2535(=25.35)   I am looking to do the same in Numbers with out pressing the "." key.  I am sure i am being silly and its in front of my face but i cannot find it.
    Thank you
    Vin

    I work with a proprietary system at work that defaults to fixed decimals = 2 when the decimal point isn't added. Drives me batty, so I sympathize with the issue of trained staff who are used to not having to use a decimal point. I billed out $200 as $2 on more than one transaction before I realized what my system was doing to me.
    Have you considered the old school method of either a separate column that automatically adjusts the data or having one table for data entry and a table that mirrors the info but does the division by 100 to put the data into the right format for your subsequent work?
    I would expect the file size to increase, but I would also hope that it wouldn't do so by 2X since there would be a lot of directly referenced cells.

  • Formula Variable decimal digits precision

    Hi All,
    I am using a formual variable checked for cumulated and digits to be 0.00. But with report output displays, decimal places upto 7 digits.
    When I uncheck cumulated, it displays properly with two decimal digits.
    Can you please throw some light on how to bring 2 decimal digit precision with checked for cumulated ?
    Thanks,
    Sri Arun Prian

    Hi Arun,
    As suggested by Akhan,Click on the KF and go to the display of KF and make the Decimals as 0.00.
    Rgds
    SVU

  • Fluke 8508a cut decimal digits

    Hello everyone,
    i have problem with data read on fluke 8508a. I have installed fluke drivers, visa 3.2 driver on labview 2009. When reading data from fluke multimeter it cuts decimal digits off. For example if i have 10.225V on multimeter it shows me just 10V on labview VI.
    Thanks in advance,
    Nedeljko!

    Hi ahem,
    change your computer to use the point as decimal separator and everything should be fine!
    Most instrument drivers expect "English" regional settings using the point as decimal separator while not checking for it.
    All measurement devices use the point. When your computer doesn't use the point, but a comma instead you have to change either your computer settings or the instrument driver…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • There no lenses listed in the profile selection area. How do I fix this I use canon gear that should

    There no lenses listed in the profile selection area. How do I fix this I use canon gear that should be there. Help!

    There are different profiles for camera Raw, and for camera JPG - and LR filters the lenses list, to show only the profiles available for the particular image you have highlighted.
    If you have selected a JPG image, you will usually see a much shorter or even an empty list of lenses - as compared with what you see if you select a Raw image. Most lens profiles with interchangeable-lens systems, are designed to correct Raw images. On the other hand, if you select an image taken with (say) a compact digital camera or supported cameraphone, any support for that will usually be in JPG.
    You can get a free Lens downloader utility from the Adobe Labs website, which gives access to the full library of lens profiles that the general Adobe user community has uploaded. Each one listed, says whether it is for Raw or not. Some of these will have been generated by end users (using another free utility) and are of variable quality. But you may get lucky, and find just what you need. Or, if it is a rarer lens or if you have particular requirements, it is not so hard to make your own profile using the Adobe utility.
    You do not need to use a profile made specifically for your camera model. The only limitation is: a crop-sensor-generated profile, will not include the right optical coverage for a fullframe camera model.
    Another option is to "kludge" a copy of an existing Raw-only profile, so that it supports JPG instead. This just requires a text editor - you change a line within a structured-text file, from Camera Raw="True", to "False". Then you save that into the Lens Profile folder in the Adobe / CameraRaw area inside your user login's "application data" area.

  • My iphone 4S wont allow me to restore a bckup of icloud it has just rebooted the os and for over 24 hours i have been trying to fix it i use this phone for my job so i need help

    My iphone 4S wont allow me to restore a bckup of icloud it has just rebooted the os and for over 24 hours i have been trying to fix it i use this phone for my job so i need help. when i try to restore it says "Your iphone could not be activated becuase the activation server is unavailable, If the problom presests goto apple.com/support"   It has done this for 27 hours now PLEASE HELP!!!!!!!!!

    - Connect the iPod to the computer and see if iTunes sees it. If it sees it try to get the photos off the iPod.
    - Next let the battery fully drain. It will likely take days. After charging for at least an hour try again
    - Last, make an appointment at the Genius Bar of an Apple store.

  • [svn:fx-trunk] 11999: Fixed: ASC-3889 - Using setting in a for loop causes Verify error

    Revision: 11999
    Revision: 11999
    Author:   [email protected]
    Date:     2009-11-19 11:37:09 -0800 (Thu, 19 Nov 2009)
    Log Message:
    Fixed: ASC-3889 - Using setting in a for loop causes Verify error
    Notes: emit pop after callstatic to a void function to balance the stack.
    Reviewer: jodyer+
    Testing: asc,tamarin,flex checkin tests
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3889
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/CodeGenerator.java

    Blacklisting the ahci module does indeed get rid of the error. Would be nice to figure out why it was conflicting with the ahci module though.
    I have not yet tried the 173xx drivers, but the latest drivers for the Quadro FX 580 are the 256.53 drivers according to nvidia.
    Posted at the nV forums (http://www.nvnews.net/vbulletin/showthread.php?t=155282), so we'll see what they suggest.

  • I cannot attach pdf files in Outlook. Just started yesterday. I need a fix as I use this alot.

    I cannot attach pdf files in Outlook. Just started yesterday. I need a fix as I use this alot.

    You can experiment with how Firefox would run after a reset or reinstall by creating a new profile.
    A new profile will have your system-installed plugins (e.g., Flash) and extensions (e.g., security suite toolbars), but no themes, other extensions, or other customizations. It also should have completely fresh settings databases and a fresh cache folder.
    Exit Firefox and start up in the Profile Manager using Start > search box (or Run):
    firefox.exe -P
    Any time you want to switch profiles, exit Firefox and return to this dialog.
    You'll click the Create Profile button. I recommend using the default location suggested (in other words, don't click the button to choose a different folder). Then start Firefox in the new profile you created.
    After Firefox settles down, try Outlook. Any luck?
    If it works, log out of Outlook, exit Firefox, restart it and check again. If it doesn't work the second time, one possible explanation is a a system-installed add-on getting picked up or activated.
    When returning to the Profile Manager, you might be tempted to use the Delete Profile button. But... it's a bit too easy to accidentally delete your "real" profile, so I recommend resisting the temptation. If you do want to clean up later, I suggest making a backup of all your profiles first in case something were to go wrong.

  • Determine Number of Decimal Place using BigDecimal

    I was interested to have the following getNumberOfDecimalPlace function :
    System.out.println("0 = " + Utils.getNumberOfDecimalPlace(0)); // 0
    System.out.println("1.0 = " + Utils.getNumberOfDecimalPlace(1.0)); // 0
    System.out.println("1.01 = " + Utils.getNumberOfDecimalPlace(1.01)); // 2
    System.out.println("1.012 = " + Utils.getNumberOfDecimalPlace(1.012)); // 3
    System.out.println("0.01 = " + Utils.getNumberOfDecimalPlace(0.01)); // 2
    System.out.println("0.012 = " + Utils.getNumberOfDecimalPlace(0.012)); // 3
    I use the following code
        public static int getNumberOfDecimalPlace(double value) {
            final BigDecimal bigDecimal = new BigDecimal("" + value);
            final String s = bigDecimal.toPlainString();
            System.out.println(s);
            final int index = s.indexOf('.');
            if (index < 0) {
                return 0;
            return s.length() - 1 - index;
        }However, for case 0, 1.0, it doesn't work well. I expect, "0" as result. But they turned out to be "0.0" and "1.0". This will return "1" as result.
    0.0
    0 = 1
    1.0
    1.0 = 1
    1.01
    1.01 = 2
    1.012
    1.012 = 3
    0.01
    0.01 = 2
    0.012
    0.012 = 3
    Any solution?

    Please [don't cross-post!|http://stackoverflow.com/questions/2296110/determine-number-of-decimal-place-using-bigdecimal], it's considered rude. If you must do it, then at least link each post so that people can find out which answers you've already got in order to avoid duplicate work on our part.
    Please read [_How To Ask Questions The Smart Way_|http://www.catb.org/~esr/faqs/smart-questions.html].

  • [svn] 4019: Fix RTE when using text as a mask

    Revision: 4019
    Author: [email protected]
    Date: 2008-11-04 16:32:57 -0800 (Tue, 04 Nov 2008)
    Log Message:
    Fix RTE when using text as a mask
    SDK-17893 - TextGraphic inside of a mask causes RTE
    When the mask is added, we weren't yet creating the displayObject which the TextGraphic class relies upon. The solution is to call validateProperties on the mask before calling validateSize.
    In addition, the mask wasn't getting applied to the Group because we weren't setting an internal flag.
    QE Notes: Test masking on both Graphic elements and Group.
    Doc Notes: We need to note that if you use TextGraphic as a mask, you must set maskType = "alpha"
    Bugs: SDK-17893
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17893
    http://bugs.adobe.com/jira/browse/SDK-17893
    Modified Paths:
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/baseClasses/Gro upBase.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/G raphicElement.as

    Does Illustrator do the same
    thing? If not, you will have to join/add the paths
    for each letter before exporting as an SVG file.
    Sometimes Illustrator groups paths rather than
    creating a single composite path, so you may have to
    mess with it a bit. Hope that helps.
    In Illustrator you can make a compound path with all the letters selected, or use the pathfinder (one of the coolest things in the latest versions)
    When orginally outlines, text is grouped together, and each letter is it's own compound path.
    (for those of you wondering, a compound path can have a cutout or more than one path. I've used it for a few upcoming themes and templates, and it works very, very well.)
    I should mention that editing a compound path with a cutout section will remove the cutout section. Can't stress that enough.

  • When I try to open iweb I get the following message: Can't open file "~/Sites/NAVIGATOR/index.html." How do I fix this? Using 10.6.3 soon to be 10.6.6 and then Lion.

    When I try to open iweb I get the following message: Can’t open file “~/Sites/NAVIGATOR/index.html.” How do I fix this? Using 10.6.3 soon to be 10.6.6 and then Lion. I have never opened the product before and have had it on the computer since new.

    Go into your Users/Home/Library/Application Support/iWeb folder and see if there's a file titled Domain.sites.  If there is double click on it and see if iWeb opens.
    If there is no Domain file there do the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • Type "CURR - Currency field, stored as DEC" only contains 2 decimal digits?

    We have a KF which has a data type of "CURR - Currency field, stored as DEC" mapped to a R3 field with 3 decimal digits, but "CURR - Currency field, stored as DEC" data type in BW/BI takes up only 2 decimal digits that the last digit of R3 field value is ignored.
    Any idea for a workaround?
    Thanks!

    Go to RSA1 - and go to the key figure info object and change the properties.
    Ravi Thothadri

  • Excel 2011 how do I turn off fixed decimal?

    Excel 2011 how do I turn off fixed decimal?

    Just press the comma button in the ribbon bar. It just right to the percentage button.

  • Update fixed decimal value

    I am trying to do a setColumnValue("ColumnName", value) for a fixed decimal field. The format of the field is defined by:
    TopStratRowSet.setFormatterInfo(new FormatterInfo(DefaultFormatManager.NUMERIC_VALUE,"###0.00"));
    I want to set the top value the same as the bottom of the previous record. I get the bottom value, print it and it looks Ok; then when
    I try to do the setValue, I get a classCast Exception. At first I tried the value as an ImmediateAccess type, then I tried
    values that were oracle.jbo.domain.Number type and no matter what, I alwas get classCast Exception.
    In my application, I have frequently updated values with setColumnValue method, but the fields have always been strings or
    integers until now.
    I have tried to log a tar, but something seems wrong with metaLink today. At first I could not log in, then when I got logged in,
    my TAR option is missing.
    I would really really appreciate any advice that anyone has.

    Can you try changing the column value thro' the Immediate access interface ?.
    import javax.infobus.*;
    AttributeInfo mycol = new AttributeInfo(...);
    ImmediateAccess ia = myCol.getImmediateAccess()
    ia.setValue( ....) ;
    1. Can you try ia.setValue( "9.99");
    I am trying to do a setColumnValue("ColumnName", value) for a fixed decimal field. The format of the field is defined by:
    TopStratRowSet.setFormatterInfo(new FormatterInfo(DefaultFormatManager.NUMERIC_VALUE,"###0.00"));
    I want to set the top value the same as the bottom of the previous record. I get the bottom value, print it and it looks Ok; then when
    I try to do the setValue, I get a classCast Exception. At first I tried the value as an ImmediateAccess type, then I tried
    values that were oracle.jbo.domain.Number type and no matter what, I alwas get classCast Exception.
    In my application, I have frequently updated values with setColumnValue method, but the fields have always been strings or
    integers until now.
    I have tried to log a tar, but something seems wrong with metaLink today. At first I could not log in, then when I got logged in,
    my TAR option is missing.
    I would really really appreciate any advice that anyone has.

Maybe you are looking for

  • Cannot download drivers for my network adapter - Gigabyte X58A-UD5 Motherboard

    Hey everyone, I recently got tired of my wireless connection for obvious reasons and decided to run an ethernet cable from my modem to my computer. I once I plugged in the ethernet cable nothing happened; I was confused and checked my network adapter

  • Sales order while MRP run

    Hello friends; My requirement is such that when i run mrp in MD02, system should not consider those sales order that are planned in previous MRP run. System should consider new sales orders that are created after MRP run. Waiting for reply. Thanks.

  • Changing images on JButtons

    hi all, I have a collection of icons that having images available in multiple sizes. The program my company is working on is geared towards deaf/hard of hearing and sight impaired individuals. I have assigned all the buttons images - however I want t

  • Long GC pauses; full gc eventually takes 30 secs. (from Developer Forums)

    from http://forum.java.sun.com/thread.jspa?threadID=5145522 jre 1.5.0_06, -Dcom.sun.management.jmxremote -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:NewRatio=3 -XX:MaxTenuringThreshold=3 -XX:NewSize=90M -

  • WRT310N-E1000:Firmware installation ver.2 FAILED

    I recently was looking for a new firmware upgrade for my WRT310N because I heard it could make my network operate faster. I saw that there was a version 2 of my router's software here, so I uploaded it on my router. It said it was successful! As it t