How rpad after comma decimal?

Hi all

I want that all numbers have 2 zeros after the decimal point, as below.

14 is > 14.00

4.6 is > 4.60

2.4 is > 2.40

5.45 is > 5.45

However, at the same time it should be NUMBER, no CAR. I am using the following formula. However, it does not work.

Select to_number (to_char (4.2, '99 D 99')) of double; == > 4.2 (the result should be instead of 4.2 4.20)

Select to_number (to_char (4.2, '99.99')) of double; == > ORA-01722: ERROR


So, what should I do?

Thanks in advance.

Hello

As others have said, end '0' are a property of strings, not numbers.

SELECT TO_CHAR (x, '99990 D 00') AS str

DOUBLE;

will produce a chain of exactly 2 digits after the decimal point, regardless of the NUMBER x.

(Well, not if x > = 100000)

Tags: Database

Similar Questions

  • How do the box values ring to have figures after the decimal point

    How do the box values ring to have figures after the decimal point

    Thanks in advance

    Control properties editor:

    Change the representation in the floating point data Type tab type, DBL will do.

    Then go to the Page of display Format and increment 'Numbers' to something greater than 1

    That toggles the column of values on the tab change the items to % .6f, or 6 digits of precision. Uncheck sequential following, values and you're there.

    If you think that's too restrictive, go back the display Format, then select if rating and you can type anything (but, the editor has a hissing fit, so you must load chains and property [] with a property node values programmatically)

    I've been struggling to get OR improve this editor of properties of the years!

  • How to eliminate zeros after the decimal point

    Hello

    I have the columns in the table of Planner has BEGIN_DAY BEGIN_MONTH BEGIN_YEAR and the values are coming as 12.00, 11.00, 2009.00.

    In the database there are no zeros after the decimal point, but when the tables are imported into OBIEE see zeros in columns above. Is it possible to remove the zeros after the decimal place to the RPD.

    Rgds,
    Amit

    Set the data type in the physical layer int.

  • textField.restrict - how just allow one decimal place

    Hello

    I read somewhere on the textField.restrict.

    I use it to limit user input to just the numbers and the decimal point.

    a.textField.restrict = '. '. 0-9 ";

    However, I find that the user can input more than one decimal place.

    Does anyone know how to limit user input to just one decimal place?

    Thanks for the help.

    This should work for you

    package
    {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldType;
    import flash.events.TextEvent;
    
    public class Test extends Sprite
        {
        public function Test()
            {
            var tf:TextField = new TextField();
            tf.type = TextFieldType.INPUT;
            tf.border = true;
            tf.width = 200;
            tf.height = 16;
            tf.x = tf.y = 20;
            tf.restrict = ".0-9"
            tf.addEventListener(TextEvent.TEXT_INPUT, restrictOneDecimal);
    
            addChild(tf);
            }
    
        function restrictOneDecimal(evt:TextEvent):void
            {
            var matches:Array = evt.currentTarget.text.match(/\./g);
    
            if  (evt.text == "." && matches.length >= 1)
                evt.preventDefault();
            }
        }
    }
    

    or if you want to restrict to one decimal place, but also a number of digits after the decimal point:

    function restrictDecimalPlaces(evt:TextEvent):void
        {
        var matches:Array = evt.currentTarget.text.match(/\./g);
        var allowedDecimalPlaces:uint = 2;
    
        if  ((evt.text == "." && matches.length >= 1) ||
            (matches.length == 1 && (evt.currentTarget.text.lastIndexOf(".") + allowedDecimalPlaces < evt.currentTarget.text.length)))
            evt.preventDefault();
        }
    
  • How to remove the decimal value (. 00) of the slider control

    Please ask me how to remove the decimal value (. 00) of the slider control and Add (if possible) % in after effects cs6.

    I guess you mean to animate text with a slider.

    Add a slider (options for expressions) to your text layer and then add this expression in your Source text:

    x = Math.Floor (effect ("Slider Control") ("Slider"));

    x+" %"

    That's all

  • Result does not display after comma

    Hi all

    I will be grateful if someone can help me with the attached VI. The weight value is read into a digital scale via RS232, the weight is read and displayed correctly but when I try and write the value to a file csv or txt digits after the decimal point is not connected. for example, 108.5 g is connected as 108.

    Best regards

    Maiz

    Given that you send a string to the writing of the worksheet function, do not use a % .10f format specifier.  Delete it so that it uses the default %s which is string.

    If you send it a digital painting, using the %.10f would have been appropriate.

  • Entry number of HTML does not accept the figures after the decimal point

    I use html5 number entry type. But do not accept the figures after the decimal point. Any suggestion welcome. Thank you

    The below HTML syntax works with the last update BB10.

  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

    http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/

  • Is it possible a 0 is displayed after the decimal point when the value is rounded? (I get: 20-20, 1;) "I need 20, 0-20, 1).

    Using the effect of text "cursor", I am able to view replace "30 ° C" "35.5 ° C". My question is: is it possible a 0 is displayed after the decimal point when the value is rounded? (I get: 20-20, 1;) "I need 20, 0-20, 1). I use this code:

    Temp = effect ("Slider Control") ("Slider");

    sliderValue = Math.round(temp*10)/10;

    [sliderValue + ' ° C ' "']

    Here is the solution:

    numDecimals = 1;

    Temp = effect ("Slider Control") ("Slider");

    sliderValue = (Math.round(temp*10)/10).toFixed(numDecimals);

    sliderValue + "° C";

  • OBIEE 11 g - truncate, not around numbers after the decimal

    Hello

    I'm working on a report on Oracle BIEE 11 g (11.1.1.6.12) where I have some scientific figures that shouldn't be rounded.  For example, I have a few 0.999999999012345678901 in the database.  His shown as 1.0 in the results on the Web page.  The problem is I want it displays 0.999999 in other words, I want to truncate after 6 decimal places and ignore the rest of the value.  I don't want to round.    Another example: it is a 123.99999999999999912345789 value in the database, but its presentation as 124,0 on report.   Once again, I want to only see 123.999999 on the report.

    Right now I look at the properties of the columns-> Data Format.  There is a checkbox for "Substitute default data Format" and the drop-down options menu is customized.    Y at - it Digital Format custom that I can use?

    Fine thanks

    Found the answer. For those looking

    Right click and go to edit the formula (instead of column properties) in the formula column, it should be "Your_table.your_column", I added TRUNCATE ("your_table.your_column", 5) and click Save.  I used 5 because I need to go to the fifth decimal place.

    Click Ok.

    Click the results tab and your desired results should appear.

  • How long after I transferred my website Muse on Adobe Cloud does take to go live?

    How long after I transferred my website Muse on Adobe Cloud does take to go live?

    Take care

    JD

    Hi JD,

    Replied to your topic here

    Re: How to set up a domain at your registrar

  • How to check the decimal value in the number field

    Is it possible to find the number of decimal digit is used.

    999.444
    444.45
    344.23
    33.666666666666

    Query provide rusult after the decimal value.

    Thank you.

    user-Keen wrote:
    Query provide rusult after the decimal value.

    Thank you.

    your_col - trunc(your_col)
    

    You have negative numbers?

    For negative values that you want to display?

    If only the decimal part, you can use ABS (col) - trunc (ABS (col))

    Published by: JAC on 4 April 2013 15:29

  • Out of amount in Excel does not apply 2 digits after the decimal

    Hi all

    Hello.

    I have an RTF template that is used to pull a release of Oracle EBS R12 report in Excel format.

    There are a few fields on the report, which must present the amount in U.S. dollars. If the XML sent out with the decimals for example 123.45 then it is print correctly on the excel column. But if the XML code sends the output 123 then instead of 123.00 on what it is like 123 exit excel.

    In the "Options" text field, Type was 'normal text '. I changed the "Number" Type and number Format #, # 0.00. But still the same thing.

    It seems, when there is no zeros after the decimal point, Excel is these cells of formatting as 'General' instead of 'Number' and drop the zeros.

    Any suggestions on this please?

    Thank you.

    Published by: 985400 on February 21, 2013 10:59

    Hello

    Here is the simple solution to the problem

    Add two spaces after the 'AMOUNT' field by pressing the space bar.

    Kind regards
    Chatresh.

  • How to add 02 decimal of a number using LPAD and REPLACE... Help, please

    What I'm trying to do is to have a variable to five digits with two decimal places:

    I want to format 33 to 033.00 or 33.5 to 033.50

    My Code:

    DECLARE
    v_traffic_total NUMBER (5.2): = 0;
    v_traffic_total1 NUMBER (5.2): = 0;
    v_code_B_total VARCHAR2 (11);
    v_code_B_total1 VARCHAR2 (11);
    BEGIN

    v_traffic_total: = v_amount_traffic - ABS (v_amount_credit) - ABS (v_amount_freemins) - ABS (v_amount_consort);
    v_traffic_total: = 33; -total of the amount of traffic
    v_traffic_total1: = 33.5; -the sum total of traffic1

    DBMS_OUTPUT. Put_line (' traffic AMOUNT B: ' | v_traffic_total); It displays 33 but I want 33.00
    DBMS_OUTPUT. Put_line (' AMOUNT traffic1 B: ' | v_traffic_total1); It displays 33.5 but I want 33.50

    -So I use lpad to 33.00 to look like 033.00 and 33.50 to love 033.50
    -and then use REPLCACE to remove the '.' after the decimal point and finally display: B03300 or B03350

    v_code_B_total: = "' B | LPAD (v_traffic_total, 5, 0);
    v_code_B_total1: = "' B | LPAD (v_traffic_total1, 5, 0);
    v_code_B_total: = REPLACE (v_code_B_total,'.) ', '') ;
    v_code_B_total1: = REPLACE (v_code_B_total1,'.) ', '') ;
    DBMS_OUTPUT. Put_line (' traffic AMOUNT B: ' | v_code_B_total);
    DBMS_OUTPUT. Put_line (' traffic AMOUNT B: ' | v_code_B_total);

    Unfortunately, I have the following:
    B00033
    B00335
    BUT I need the results: B03300
    B03350


    Help, please
    Hope

    In addition:

    SQL> select 'B' || ltrim(replace(to_char(33.5,'0099.00'),'.','')) from dual;
    
    'B'||LTRIM(REPLACE(TO_CHAR(33.
    --------------------------------------------------------------------------------
    B003350
    
  • How to add commas in values

    Nice day

    I created the report and the displayed value not have commas in values such as "3,20,000", my values are displayed as '320000.
    How to add commas in the apex.


    Kind regards
    OMZ

    Hello

    Version of the apex?
    Classic report / IR?

    Try to set the attributes of report > Edit Column > column attributes > number / Date Format

    See you soon,.

Maybe you are looking for