Make one number after the decimal point

hi all
i have a column named quantity from the table job_done
with values
1900.8988
34.67
0.6788
236.67
789999.67676868
i require the values to be 1900.8
34.6
0.6
236.6
789999.6
i just require one number after the decimal point,i know substr but i am confused as to how to achieve this output
kindly guide
thanking in advance

http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions221.htm#SQLRF06150
Regards
Etbin
Edited by: Etbin on 5.5.2013 14:33
<tt>substr(quantity,1,instr(quantity,'.') + 1)</tt> if those are not numbers but all contain a decimal point
Edited by: Etbin on 5.5.2013 14:40
<tt>case instr(quantity,'.') when 0 then quantity else substr(quantity,1,instr(quantity,'.') + 1) end</tt> when there are no <tt>null</tt> values
<tt>trunc(to_number(quantity),1)</tt> seems to be the safest if quantities are really <tt>to_char(some_number)</tt>

Similar Messages

  • Limit the number of digits after the decimal point

    hi,
    in webform how to limit the number of digits after the decimal point?
    thanks

    Hi,
    In the Web form Design menu there is a tab for Other Options wherein you would find the setting for number of Decimal places.
    Thanks.
    Madhavi

  • How to delete trailing zeros after the decimal point in the ALV sum

    Hello Expert,
    In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point.
    for example,
    If the sum is 134.00, I only want to display 134 on the alv.
    Does any expert have idea about it?
    Thanks in advance,
    best regards, Johnny

    Hi ,
    Use following
    SHIFT variable RIGHT/LEFT DELETING TRAILING '0'.
    For more variations ,
    just write SHIFT and press f4 , it will show you the information you need.
    Hope this is helpful,
    Regards,
    Uma Dave

  • How to cut the zeros after the decimal point ?

    Hello everybody,
    does anyone know a solution how to cut the zeros after the decimal point at at CHAR data field?
    For example the field
    &RM06P-PRMG1&
    This is a char field in the database, so that the command
    &RM06P-PRMG1(.0C)&
    doesn't work.
    At the moment the output on the form is like that
    124,000
    It shoud be like that
    124
    It would be great if anyone could help me!
    TIA!
    Strobbel

    Hi Strobbel,
    If you are working on standard sapscript, first make a zcopy of it, do the modifications in that and assign the new form to the output types in tcode NACE.
    First you need to create a program to write the logic, so go to tcode SE38 , create a new program (say zremove_zero) with Program type Executable.
    Now you will see ABAP Editor with statement;
    Report zremove_zero.
    Add the following lines below the report statement.
    *&      Form  remove_zero
    *       text
    *      <--lv_AMT  text
    FORM remove_zero  CHANGING lv_amt.
      DATA p_amt TYPE p.
      MOVE lv_amt TO p_amt.
      MOVE p_amt TO lv_amt.
    Condense lv_amt.
    ENDFORM.
    Now save and activate the program.
    Now open the zcopy of your script and Just above the statement  &RM06P-PRMG1& write the following lines;
    /: perform remove_zero in program zremove_zero
    /: changing &RM06P-PRMG1&
    /: endperform.
    Now you can see your amount printing without decimals.
    Try and let me know, hope i have guided you clearly.
    Regards
    Karthik D
    P.S.: I advice you to take help from an ABAPER.

  • Removing zeros after the decimal point       Reply with quote

    I want to remove the zeros after the decimal point, that this be done?
    Например, Example,
    120.000 => 120 120.000 => 120
    120.300 => 120.3 120,300 => 120.3

    hiiiiiiii sweetsoni,
    try this may it helpful for you
    SHIFT string RIGHT DELETING TRAILING '0'.
    SHIFT string RIGHT DELETING TRAILING '.'.
    for example
    DATA: v1 (6) TYPE c VALUE '100 .000 ',
    v2(6)  TYPE c VALUE '100.200'.
    SHIFT v1 RIGHT DELETING TRAILING '0'.
    SHIFT v1 RIGHT DELETING TRAILING '.'.
    SHIFT v2 RIGHT DELETING TRAILING '0'.
    SHIFT v2 RIGHT DELETING TRAILING '.'.
    ultimately
    v1 = '100',
    v2 = '100.2'.
    Moderator message: question and answer copied from external source, points deducted, do not repeat!
    Edited by: Thomas Zloch on May 19, 2010 2:14 PM

  • OBIEE 11.1.1.6 - Requirement is to show 3 digits after the decimal point.

    Hi,
    I have a requirement to concat 2 columns ( 1st column is a text column and 2nd column is a numeric column set as double in RPD). For the 2nd column, user wants to see 3 decimal digits all the time.
    For example, if the value is 2.4567 then I need to show round off value 2.457 and if the value if 3.4 , then I need to show 3.400 and if the value is 4 then I need add decimal point and show 4.000.
    Please let me know how I can achieve using OBIEE application without having to go through RPD.
    Thanks
    Swarna
    Edited by: 934460 on May 15, 2012 12:48 PM

    Try the following:
    In this example:
    Column 1: Month Name
    Column 2: Revenue
    Column 3: Month - Revenue
    Formula for Month - Revenue column will be:
    Month Name ||' - '|| cast(round(Revenue, 3) as char)Hope it helps.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • How to elininate the Zeros after the decimal

    Hi,
    I columns in the scheduler table has BEGIN_DAY BEGIN_MONTH BEGIN_YEAR and the values are coming like 12.00, 11.00, 2009.00.
    In the database there is no zeros after the decimal but when the tables are imported to OBIEE the see the zeros in the above columns. Is there any way to eliminate the zeros after the decimal points in the RPD.
    Rgds,
    Amit

    It should not display zeroes if you set the column type to INT in Physical.. probably you might have forgotten to refresh the Server Metadata...
    Other way you can give a try is - In Answers, go to Column Properties => Data Format and check 'Override Default Data Format' then choose 'Decimal Places' to '0'..
    Note: this eliminates 0s only in this report..

  • Format a number with a decimal to show the value but not the decimal point

    I have a value of 129.50 in the DB. I'm using the htp.prn() function to export this value to a txt file. I have the field padded with leading 0s (so it looks like 0000129.50)
    I need to keep the value for the .50 but don't want the decimal point to show up (so I need it to look like 000012950) but can't figure out how to make it keep the value for the .50 but not actually show the decimal point - any ideas? (APEX 4.0 11g)

    Multiply by 100 and remove the formatting. htp.prn (to_char (number_item, '99999999999'));
    Edited by: Kleber M on Sep 14, 2011 5:10 AM

  • Can't figure out how to solve the decimal point bug in this calculator code

    Hi guys, I'm new in flash and is currently learning how to build a simple calculator with multipliers (plus,minus,multiple,divide,decimal point and change sign) but I'm stuck on the decimal point and change sign.
    var multiplier_old:Number = 10;
    var multiplier_new:Number = 1;
    // .: Sets the multipliers so that new input numbers become decimals of a lower unit column
    action_point.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
              multiplier_old = 1;
              multiplier_new = 0.1;
              point = true;
    // Takes intput from the input_ buttons and adds it to the input after applying the multipliers.
    // If `point` is true then the multiplier_new is divided by 10, also as described.
    function inputNumber(n:Number):void {
              input = input * multiplier_old + n * multiplier_new;
                        if (point) {
                                        multiplier_new *= 0.1;
                       trace(multiplier_new);
              output_txt.text = input.toString();
    Decimal point
    The problem is that when I input 2.7 in the calculator, it will display the values in output_txt correctly. But then when I input 2.78, it will display 2.780000000000000000000000002. This will also happen to other numbers if the input is too big.
    What I want is just 2.78. How do I change the codings to make 2.780000000000000000000000002 become 2.78?
    Change sign
    Any tips on how to start on this one?
    Thanks for your time,
    Zainu

    I think you misunderstand what I mean. The weird decimal doesnt comes out after I press the 'equals' sign. It comes out when im just pressing on the caculator number buttons
    First I click the no.2 button and then the decimal point button.
    So the caculation output display will show
    2.
    after that I press the no.7 button
    2.7
    and then no.8 button. It appears like
    2.7800000000000000002
    This is the code I use when the user press the decimal point button.
    // .: Sets the multipliers so that new input numbers become decimals of a lower unit column
    action_point.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
              multiplier_old = 1;
              multiplier_new = 0.1;
              point = true;
    // Takes intput from the input_ buttons and adds it to the input after applying the multipliers in the method described above.
    // If `point` is true then the multiplier_new is divided by 10, also as described.
    function inputNumber(n:Number):void {
              input = input * multiplier_old + n * multiplier_new;
                        if (point) {
                                 trace(multiplier_new.toFixed(3));
                                  multiplier_new *= 0.1;
                                  //trace(multiplier_new);
              output_txt.text = input.toString();
    I think there is some code wrong in this function that makes this weird problem. I tried putting toFixed method but it's still not working.
    Sorry for this long reply but I have to try my bestto explain with my bad english.

  • [SOLVED] bc and the decimal point

    Hello,
    I've been trying out bc today and I've come across something:
    If, for example, I try and calculate 1/10 in bc (whilst setting scale to, say, 5), I'll get .10000. Is there some way to always display the number to the left of the decimal point, even if it's a zero (i.e. 0.10000)? 5/2 will get 2.50000, which makes sense.
    Thanks for your help.
    Last edited by Manifold (2011-12-30 14:40:30)

    karol wrote:http://stackoverflow.com/questions/2965 … ber-format
    I did something quite similar, but using a bash script to concatene a '0' in front of the decimal place. I just thought there was a simple variable to set that I'd missed but I guess not. I wonder what the design purpose of missing out the 0 on the left hand side of a decimal place is.

  • How to remove the decimal points at the end of the value????

    hi,
    we are using crystal reports 9.0. we have some reports which contains group by field.  we have one field like address. if we select group by as address "The data is displayed grouped by the Address. But the address is shown in decimal points". for example if we have 55 as address field value, it shows 55.00. 
    the formula has written like as follows
    if lowercase({?GroupBy}) = 'Address' then totext({rsp_GetDevMicro.Address})
    now, i want to remove zeros which comes along with address field values.
    can anyone help me in this?

    Not sure about Crystal 9 but on 11 I would convert it to a number to remove the leading zeroes then back to text again which allows you to remove the decimal point and any thousand seperators, ie:
    CStr(ToNumber(),0,"")

  • Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hey ilyaz20360341,
    Could you please specify how exactly did you transfer Acrobat from one MAC to other.
    You might need to deactivate the software from your old machine and then activate it on the new one with the same serial number (for Acrobat license) or Adobe credentials (for Acrobat subscription).
    If you have done the same way, then let me know if you are able to open Acrobat itself.
    Do you get any specific error message while opening a PDF?
    Hope to get your response.
    Regards,
    Anubha

  • In a pages table change the decimal point to a comma

    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.

    Scott Fox wrote:
    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.
    I apologize but _*in many countries*_ the usual decimal separator is not the decimal point, it's the comma.
    It's time to understand that American habits aren't the universal rules or ways of life !
    I'm not saying that American habits are bad, just that they are local ones, not better than others.
    Yvan KOENIG (VALLAURIS, France) mercredi 30 septembre 2009 16:01:23

  • IN sharepoint 2013 custom list number type column ,decimal point shown as comma

    i have a sharepoint 2013 site in which a custom list is there. In number type field while i enter decimal number, instead of decimal point comma is comming. Any help appreciate
    Thanks sanjay

    Hi SanjayPradhan,
    According to your description, my understanding is that when type decimal point in number field, it became comma.
    I made a test in my enviroment and it works like a charm.
    Did you have some formula in that column ?
    If yes, I suggest you can check the formula in list settings->columns.
    If No, I suggest you can recreate a new list and number field to test whther it works.
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • Problems with the Scanner class and the decimal point

    I'm creating a GUI so to get the user input (double value) I use a jText field and the Scanner to read that value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = new Scanner(time).nextDouble();
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                                  The problem is that the decimal point it's a comma so if I write:
    1.2
    t = (Error InputMismatchException)
    1.236
    t = 1236.0
    1,2
    t = 1.2
    So I try using the parse method to get the double value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = Double.parseDouble(time);
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                            In this case the method parseDouble() takes the dot as the decimal point so if i write:
    1.2
    t = 1.2
    1.236
    t = 1.236
    1,2
    t = (Error InputMismatchException)
    � What can I do to Scanner class to accept the dot as the decimal point?
    I think that the problem is becouse in some countries (I'm from Colombia) the decimal point is a comma and in others is the dot.
    Thanks

    From the Javadocs for Scanner:
    Localized numbers
    An instance of this class is capable of scanning numbers in the standard formats as well as in the formats of the scanner's locale. A scanner's initial locale is the value returned by the Locale.getDefault() method; it may be changed via the useLocale(java.util.Locale) method.
    If you change your locale to one of those that does use a comma for a decimal point, it should work.

Maybe you are looking for

  • How to get selected annoatation thru notification

    Hi , I want to know that thru which notification, I can get selected annotations. I tried to use AVDocDidSetSelection but this works when I select only one annoation . And whenever I select more annotation using ctrl key then I don't get DidSetSelect

  • QuickTime Error:-23

    QuickTime Error:-23 I have been getting this error in Compressor when I try to render out of FCP and have tried reinstalling FCP and Compressor and then QuickTime 7.6.4. Has anyone ever seen this. I am running OS 10.5.8 FCP 6.0.6 and QuickTime 7.6.4

  • How to solve conflict mail address when using aliased domain?

    Currently I am using domain1.com on messaging server. For some reason I have to merge users from domain2.com to the same messaging server. How can I solve the email address conflict problem if two users have the same username on domain1 and domain2?

  • Adobe flash on N8

    Hi all I'm a first time poster long time reader of this site and was looking for a few answers. Is it possible to use adobe flash application on my N8, I am trying to watch online screened content (chelsea TV) but I dont see mobile phones supported w

  • Microsoft visual c++ 2010 express doesnt install correctly! PLEASE HELP!

    My Microsoft Visual c++ Only downloads 6 files when it suppose to download 9 . I tried reseting my computer and it still didnt work and im trying to use it for my really important work. If someone helps me out it will be helpful . Please contact me A