TO_CHAR number formatting wanting 0 in front of period if needed

Hi,
I am displaying a percentage to my client and he wants a percentage of less than 1 to show with a 0 in front of the period, i.e. .2 should be 0.2. Sounds reasonable to me. Have experimented with the different number formats of TO_CHAR and I have not found a solution for this yet. My solution should be able to handle any percentage between 0 and 100. I show 1 digit after the period.
TO_CHAR(ROUND((total_used*100/total_equipped),1), '09.9') - now .2 shows as 00.2 - no good
TO_CHAR(ROUND((total_used*100/total_equipped),1), '0.9') - now .2 shows as 0.2, but I can now no longer display percentages using 2 digits before the period.
Anyone have a solution to this? Thanks!!!
-hd

Or sth. like this?:
SQL>  with t as
  select 0   pr from dual union all
  select 0.8    from dual union all
  select 23.81  from dual union all
  select 100    from dual union all
  select 1.4    from dual   
select to_char(pr,'990.0') || '%' pr from t
PR    
   0.0%
   0.8%
  23.8%
100.0%
   1.4%

Similar Messages

  • I am trying to change the page number format in a section of my document.  I want 2 sections to have 2 different page number formats.  How can I do this?

    I have 2 sections in my Pages document.  I am using Insert Auto Pages in footers to number my pages, but when I try to change the number format for one section it changes the format to the same as my change for the other section.  I want auto page number in each section but want each section's page numbers to have different formats. I have managed to get the auto page numbering to begin separately in each section, but just can't get the formats to be different.  There must be a way to do this.  Anyone know how?

    You look on the right edge of this page in the box entitled [More Like This].
    The dumb machine was able to find threads containing available answers .
    Using the Search feature with a simple request like
    page number AND format AND section
    would have give these links without opening a new thread.
    Yvan KOENIG (VALLAURIS, France) samedi 28 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    Please :
    Search for questions similar to your own
    before submitting them to the community

  • Phone number format edit

    Hello everyone, i have a problem with my iPhone 4S. I'm from Romania so it's not a verizon problem only... When a person in my contact list is calling me it only shows the numer of the caller not the ID, but after i hang-up and go to call history it shows the ID. I tried to put +4 in front of the number but now when someone is calling it shows the ID but in call history it shows the phone number. The phone is Jailbroken so if there is any solution what requires a jailbroken phone i am happy to try it out. The format region is on Romania and the International Assist is OFF. I tried as many things i could find on the internet about this but still can't figure it out. Can you guys help me? My firmware is 5.1.1 and i DON'T want to upgrade to 6 because i use a gevey sim card to unlock it, so anything else that can help ?

    Thanks, indeed. I had my Phone language set to "English (United States)" . I never thought that this would change the number format. I changed it to English and now it's ok.
    + it stopped with that annoying correction while i'm writing text.
    So double thanks
    Attachments:
    wp_ss_20130524_0002.jpg ‏71 KB

  • Number Format Model (Percent Sign)

    Hi all,
    I am hoping that someone will be able to assist me with a Number Formatting issue I'm experiencing using APEX 3.0.1.
    I have a report display a financial amount and a percentage column and I want to display totals for both these columns with appropriate signs - local currency for fiscal amounts and percentage sign (%) for the percent column.
    The financial column is easy as it is included in the seeded number formats available but I don't believe there is a format modifier for the % sign. I have achieved displaying the percentage sign at individual row level by adding #PERCENT#% to the HTML Expression of the Report Column Attribute.
    ......    <Fin Col>   <% Col>
            $1,230.00          0.01%
                $30.55         15.00%
            $1,000.00          3.00%
            $2,263.55          18.01 <-- Missing % sign in sum row
    However the percentage sign does not appear in the calculated sum total row.
    Doing a TO_CHAR in the actual SQL Query for the percentage column means that the sum row always returns 0 (zero).
    Does anyone know how I'd be able to achieve the formatting at a sum row level for the percentage column?
    Kind Regards,
    Gary.

    You mixed both expression in a format.
    G- comma(,)
    D- decimal (.)
    Yours
    select to_char(9693.256,'$0G000.000') from dual;that should be either of this way
    select to_char(9693.256,'$0G000D000') from dual;or
    select to_char(9693.256,'$0,000.000') from dual;i hope you could understand.
    kanish

  • Changing a number format

    Hello,
    How do you change a number format from double to pounds and pence. For example I have the number 27.85. I want to change it so it will read as ?27.85 OR ?27 and 85 pence?
    Thankyou for your help in advance :)

    are you just talking about printing the little pound symbol in front of the number?
    If that's the case, you could just write something like this:
    System.out.println("\u00A3"+ monies);where monies is your double (I'm not a brit, and I don't know if you folks have a pound symbol on your keyboards there).
    If you know that with certain doubles that you will always be printing a pound symbol with them, you could always just write a method that will print whatever you have with a pound symbol in front of it.

  • Break formatting and number format of SUM value

    Where can I put number formatting functio, which will format breaking sum values...like:
    to_char(#SUM_VALUE#,'fmt 999G999G999G990')....maybe this thread is somewhere posted, but I cannot find it.
    Next, how to exclude showing reports total at the end of report?
    Is there any working demo to see some hints...
    THX!
    Message was edited by:
    Funky

    Hello Damir,
    "Maybe a hint for feature releases to have an option to disable total report sum on column …"There is a relative simple workaround, which will allow you exclude or highlight (style) this total report sum line, as you can see in here - http://htmldb.oracle.com/pls/otn/f?p=22710:10
    In the Report Attribute page, I'm using the Break Formatting section first field "Display this text when printing report sums" - http://i10.tinypic.com/4ie8ck5.png .
    If you want to exclude this line, you should use the same color as your cell background. For the example page, the code is looking like this:
    <div id="FinalSum"><script type="text/javascript">var lastRow=html_CascadeUpTill('FinalSum','TR'); lastRow.style.color='#f7f7e7';</script></div>If, on the other hand, you want to highlight the line, or use any other CSS attribute style available, the code would look something like this:
    <div id="FinalSum1"><script type="text/javascript">var lastRow=html_CascadeUpTill('FinalSum1','TR'); lastRow.style.backgroundColor='#CCCC99';</script>Total Report Sum</div>    Regards,
    Arie.

  • Showing Positive Sign as Number Format

    Hi all,
    Is it possible to set the number format (custom format) to show the positive numbers with positive sign (+) in front of the number (for example, +2, +2.3, +0.0, etc).
    I don't want to have to cast the number as string and do a concatenation. So, is it possible to do that using a custom number format?
    Thanks a lot!

    Yess it is possible....
    Go to Column Propoerites -> Conditionla Format - > Add Condition
    If seleted measure is greater than or equal to 0
    then Edit format will open . In that goto -> Data Format -> Check on Override Default Data Format -> Select Custom
    Then add this +##,###,###
    Thanks and Regards,
    Fiaz
    mark as answered

  • COPA line item report, Number format  -output type - object list(ALV).

    Hi,
    I am preparing COPA line item report. I want to change number format (two decimal place). I did the changes in form level then I did the changes in drill down report as well and saved as save definition.
    But changes are not reflecting in- output type - object list(ALV).
    Please provide help in this.
    Regards

    HI
    What t-code you are using to write this line item report ?

  • How to change number format in web reports

    Hi, Experts,
        Simple question, if I want to change the number format on web report as following
    . . . . . . . . Actual
    . . . . . . . . *1000SGD 
      new order   .   341.5
      sales       .   567.45
    if I click "Actual" then select properties, set data format from "in 1000" & "0" to "in 1" & "0.00", nothing changed in web report after refresh.
    if i click one number (for example: 341.5) or "New order" to set data format from "in 1000" & "0" to "in 1" & "0.00", only this row's format is changed, others row still keep old format.
    how to change whole column's data format at once setting?
    thanks in advance.
    Message was edited by: jie miao
    Message was edited by: jie miao

    Hi,
    Logout and login may help you and also Delete the session in SM04  before re login. Some times system will not do complete refresh of data even though you select refresh button.
    With rgds,
    Anil Kumar Sharma .P

  • How do I change the number formatting within a Cell Table in Microsoft Word?

    Hi, I was wondering if someone could help me out on an issue I've been having... I work for an accounting firm and we do a lot of financial statements. 
    I was wondering if we would be able to treat a cell table in Microsoft Word 2007 like I would a cell table in Microsoft Excel. Meaning, I would like to change the formatting of the numbers in the table to the "Accounting" (number) format so it
    aligns by the decimal point and use the $ signs and () for negative numbers.  We do use the link tables feature, however, most of our balancing pages just can't be done in Excel because of the way the text is written. It would be much harder to format
    the text if it were to be typed in Excel. We have also tried  creating an Excel sheet within Microsoft Word but it is the same as linking the tables... Again, a text formatting issue.  The only option is to use tables within Word but how do we change
    the number formatting to a "accounting" (number) format where the numbers would align with the decimal point and use () for the negative numbers. Is there ANY option for us to do this other than manually entering this information in using tabs?  
    If there are no options other than entering it in manually, please consider this as an option for your next software update. I believe that a LOT of people out there will be interested in this feature... My manager and I just attended a webinar on Microsoft
    Advanced Word Tips Tricks and Techniques and 75% of the attending people had this question but no answer.
    Thank you very much for your help!!!!!

    Word does not really have number formatting for table cells. You can align cell contents on the decimal point, though, by setting a so-called decimal tab stop.
    Option 1:
    - Select the cells for which you want to do this.
    - Display the ruler.
    - Click the Tab box on the left hand side of the ruler until the box contains an inverted T with a dot.
    - Click in the ruler where you want the decimal tab.
    Option 2:
    - Select the cells for which you want to do this.
    - Click the arrow in the lower right corner of the Paragraph group on the Home tab of the ribbon.
    - Click the Tabs... button in the lower left corner of the dialog.
    - Specify a tab position in the box, e.g. 1.5".
    - Select the 'Decimal' radio button under 'Alignment'.
    - Click Set.
    - Click OK.
    You will have to type the numbers as they should appear, including the $ for currency and the ( ) for negative numbers.
    Regards, Hans Vogelaar

  • How to use FM format element in number format model

    Dear all,
    Could anybody explain what is FM format element for in number format model? I read the documentation, it doesn't show a clear description as it those in Datetime Format Model section.
    regards,
    Valerie

    It works mopre or less the same for numbers as for dates:
    SQL> -- generating some numbers:
    SQL> with t as (
      2  select level n
      3  from   dual
      4  connect by level <= 10
      5  )
      6  --
      7  -- actual query:
      8  --
      9  select n
    10  ,      '*'||to_char(n, '09')||'*' nofm
    11  ,      '*'||to_char(n, 'fm09')||'*' fm
    12  ,      length(to_char(n, '09')) lnofm
    13  ,      length(to_char(n, 'fm09')) lfm
    14  from   t;
             N NOFM            FM                   LNOFM        LFM
             1 * 01*           *01*                     3          2
             2 * 02*           *02*                     3          2
             3 * 03*           *03*                     3          2
             4 * 04*           *04*                     3          2
             5 * 05*           *05*                     3          2
             6 * 06*           *06*                     3          2
             7 * 07*           *07*                     3          2
             8 * 08*           *08*                     3          2
             9 * 09*           *09*                     3          2
            10 * 10*           *10*                     3          2
    10 rows selected.As you can see, the leading spaces are trimmed.

  • Stored Procedure for Batch Number Format and Block Duplicate Batch Number

    Hi Experts !
    I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
    Example :
    My Batch number format Like  BATCH00001 - It should be first five digit is text format and next five is Numeric.
    IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .

    Dear Nagarajan K.
                         Thanks for your replay ..
    IF @transaction_type IN ('A','U') AND (@object_type = '106' )
    BEGIN
    set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
    set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
    --set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    set @count = (select count(*) from oibt quantity > 0 and where  batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    if @count > 1
    begin
    set @error = 1
    set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item 
    select @error, @error_message
    END
    END
                  I used above Stored Procedure. here we can use one batch number for different item but  i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
             After that I want format for Batch, we should follow unique Batch number for all items.

  • Number format issue - comma (1,5) instead of period (1.5) before decimals?

    I am using an input field of data type Number. In Norway we use a comma before decimals. I can't get this to work in VC. Have tried to set Number format with 'Local format' checked but this is not helping. (even if my portal is showing Norwegian texts as supposed by the language setting)
    If I uncheck this and go to Custom formatting I get to set my own format. NSTR(@OPERATORER_N, ".2") gives me two decimals but with a period as the decimal point. NSTR(@OPERATORER_N, ",2") does not work.
    I do not want thousands separator.
    Tips?
    Henning Strand

    Hi,
    Check the se Threads i think you definitly get the idea or solution.
    But every body ask about to get dot separatot instaed of Comma Separator since this can be get easyly with Language Portal Settings
    Thousands separator
    http://help.sap.com/saphelp_nw70/helpdata/en/38/2d9b732beb4c68bba2962602a7d6bd/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/26/64fb472a144a0dbaf88f5ec75d9270/content.htm
    http://oregonstate.edu/dept/computing/warehouse/PDF/8-reports.pdf
    Re: Supressing Currency & Thousands Separator
    Re: Special Number format Mask Visual Compser
    All the best
    Govindu

  • Impact on roaming profile accounts if we Change User logon Name to Employee Number format in Active Directory for all User accounts

    I want to understand if we change User logon Name to Employee Number format in Active Directory for all User accounts, then what would be the impact on existing profile. Whether we need to change it manualy or it will connect to same profiles in terminal
    session.
    As i observed it create new profile after logon name changed to employee number where existing users profile settings get fails to load and prompt for new settings (such as outlook reconfiguration, share drive mapping etc.).
    Kindly let me know the proper process to overcome with this, how to connect same existing roaming profile with employee number format change.

    Hi,
    What if we change the user name of user account, will it have impact on roaming profiles.
    Yes, it will affect roaming profiles. Please rename the roaming profile folder as the new user account name, in addition, change the profile path in ADUC.
    Here is an related article below for you:
    How to Rename a Windows 7 User Account and Related Profile Folder
    http://social.technet.microsoft.com/wiki/contents/articles/19834.how-to-rename-a-windows-7-user-account-and-related-profile-folder.aspx
    Best Regards,
    Amy

  • Incorrect number format appearing in report

    This might sound like a really silly question, but I've not had much need to faff around with changing number formats.
    We have a report which is taking a number column and outputting it directly, but when the number is something like 0.1234 it strips the 0 and outputs it as .1234.
    I imagine that this is something to do with the nls-settings of the client producing the report, but I need to make sure it outputs the value as 0.1234
    I've come up with the following, but I'm not sure that it's the simplest solution:
    SQL> select to_char(1235.234,'fm9999999990.9999999999') from dual;
    TO_CHAR(1235.234,'FM99
    1235.234
    SQL> select to_char(4.2333, 'fm9999999990.9999999999') from dual;
    TO_CHAR(4.2333,'FM9999
    4.2333
    SQL> select to_char(.3992, 'fm9999999990.9999999999') from dual;
    TO_CHAR(.3992,'FM99999
    0.3992It seems to work, but seems a bit OTT to me - like I'm using a big JCB digger truck to dig a hole so I can plant a tulip bulb.
    Are there any better solutions out there?

    Actually, I've just kicked off the PL/SQL procedure that produces the report (as a text file, via utl_file) from my machine, and the output is the same - 0.1234 is output as .1234.
    Hmm, and:
    SQL> select 0.1234 from dual;
        0.1234
         .1234Question is, is there a simpler/more elegant way of getting the missing 0 displayed than what I've already come up with? (I don't like it much because it assumes that there won't be more than the specified number of digits before and after the decimal point. It's unlikely that there would be, but even so...)

Maybe you are looking for

  • How do I disable an old apple ID so that iCloud can function for me?

    I recently enabled a new email address for myself and everything seems to work fine on my Mac and iphone except for icloud. I keep getting messages that pop up asking for my password to my old apple id and it never recognizes it when I put it in. Why

  • To Config Campaign to run @ specific time by using TG from BW.

    Hello CRM Guru's, The current task for me is to run a automated campaign for the TG of customers we are directly getting from BW system. The campaign should run when it gets a TG from BW system everyday at 8 PM GMT. Can anyone please guide me how to

  • Adding multiple indesign pages into one manual

    HELP, I am trying to make one big manual out of 60 different indesign files. How do I do this? I have been trying to find help on it without success. Can someone help me? THANK you! Stephanie

  • Jclient error: java.sql.SQLException: OALL8 is in an inconsistent state

    Dear all, who can help us about java.sql.SQLException: OALL8 is in an inconsistent state. Our application system is build for Jdeveloper 10.1.2 with JClient+BC4J and be deploy on 2-tier application architecture(through Web Start) , and the database i

  • Little problem in Logic Express 9

    Hello all, I'm having a little problem there.. I bought recently an akai LPD8 controller, i set it up in controller assignment and it works fine. Now, if i quit Logic, and re-open it, the controller assignment still there. great. If logic crash or qu