Format Mask issue

Hello All,
I need to convert a number '178473' to '000178473.00'
I've tried this but of no use.
SELECT TO_CHAR(LPAD(178473.00,9,'0'), '999999999.00') FROM DUAL;Required:000178473.00
Thx
Shank.

You just need to replace 9's with 0's.
SELECT TO_CHAR(178473.00 ,'FM000000000D00') FROM DUAL;FM removes the left hand side blank space. D is for the decimal separator, respecting you NLS settings.

Similar Messages

  • Oracle Number and Java Format Mask Issue

    I have a oracle number column, in my view object it is of type BigDecimal and the query column type is NUMBER
    I put the following format mask in the hints section
    #####.00
    with a format type of Number,
    Yet when I run the application, I always get the following error
    java.lang.NumberFormatException: For input string: "-3750.00"
    Anyone any ideas why this does not work?
    Regards
    Orlando

    Hi,
    try with <af:convertNumber>
    See:
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_convertNumber.html
    ADF 11.1.1.4.0 af:convertNumber not working with #,##,##,##,##,##,##0.00

  • Help: Date Format Mask Issue year 0004 instead of 2004

    Hi,
    I set Date Format Mask as MM/DD/YYYY for a date field. However, when user enter
    12/31/04 the result turned out as 12/31/0004
    Of course, I'd like user put 12/31/2004, but 12/31/04 leads to 12/31/0004 has to be stopped.
    Any suggestions?
    Thank you in advance.
    Jimmy

    Thank you very much Francois and it works for me.
    Jimmy

  • Format mask 999D99 in Oracle Form issue

    I have a textbox in Oracle form, with format 999.99 => means that we can input 0.99 0r 100.00
    But now, I want to input only as 100 or 0.99, I don't want any .00 if i type 100.
    Just i want 100 as 100 and 100.1 as 100.1 and 100.11 as 100.11. I don't want 100 as 100.00
    i have tried format masks like 990D00 , 999.99, B999D99 , B990D00, 990D99, but all the formats is displays input 100 as 100.00, Please let me know which format mask will resolve my issue.

    In this case, it is allowing more than 2 decimal places. i want maximum of 2 decimals. i have used lowest as 0 and highest as 999.99

  • Date format mask in Enter-Query mode

    Hi,
    I'm developing a Form which is able to query the masterblock from a detail-item.
    The queryable detail-item is a date field and has a datatype: DATETIME. When a new record is entered the values in the date field are stored in the database like "18-10-2002 15:04:02"
    When the form is in enter_query mode the user must be able to enter 18-10-2002 (DD-MM-YYYY format mask, so without time mask). When execute the query with this date format the query is not able to find data.
    I used a Key-Execute-Query on the detailblock like this:
    SELECT 1.COLUMN
    , 2.COLUMN
    INTO :1.COLUMN
    , :2.COLUMN
    FROM TABLE.1
    , TABLE.2
    WHERE 1.COLUMN = 2.COLUMN
    AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    Can anyone please help me?
    Regards,
    Ronny.

    Hi Ronny,
    I'm not sure to have got exactly your issue (especially why you have to use that select in master-detail query), but I suggest you to substitute
    ...AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    with
    ...TRUNC(1.COLUMN) = TO_DATE(:avg.datum,'dd-mm-yyyy');
    To be fair, I would use it in the where clause, even if you set it dinamically.
    Let us know,
    Marco

  • Format Mask for Zeros

    Hi guys.
    I have a report in which I want to give format to a number, but I'm getting an issue with the 0 (zero).
    The format mask I'm using is "999,999,999.99", but when I got a 0 it is printed like ".00" and I want to print it like "0.00", in any other case I want to print the number like "123,456,789.00"
    Hope somebody can help me.
    regards

    use "999,999,990.00"

  • Date Picker (Application Format Mask) YYYY-MM-DD HH24:MI

    I am experience what appears to be a bug with the Date Picker (Application Format Mask) that is causing the "DD" portion of the format mask to be interpreted as "CC" (when using a YYYY-MM-DD Application format).
    Within "Application Builder", "Edit Attributes" I have defined a "Static Substitution Strings" with the required Substitution String of PICK_DATE_FORMAT_MASK and a Substitution Value of "YYYY-MM-DD HH24:MI" (without the quotes).
    When this is used within the application, and I select a date of "January 15, 2008 @ 23:14", the date picker gives me a date of "2008-01-20 23:14". If I were to change the Year to 1957, the date I get is "1957-01-19 23:14". Note that if the century is 20, no matter what day of the month I pick, I get DD=20. If the century is 19, the day of the month is always 19.
    I have also tested this with a format of YYYY-DDD HH24:MI. With this format too, the DDD gets set to the century portion of the year.
    DD-MM-YYYY HH24:MI format does work, however this is not the format that my end users want to see. They want to see the format as "YYYY-MM-DD HH24:MI"
    If I change the PICK_DATE_FORMAT_MASK to "YY-MM-DD HH24:MI" and pick "Feb 8, 1977" I get "77-02-28" and if I pick "January 9, 1921" I get "21-01-31" which just happens to be the last day of the month in each of those case.
    So, something really weird is happen with the "Application Format Mask" Date Picker.
    Please note, that because of a known bug (relating to the translation of the Browser Language of "en-ca" to the propery NL_LANG of ENGLISH_CANADA) refer to
    HTMLDB - HOWTO Work with Dates
    I am executing the following code in my first "On Load - Before Header" and my first "On Submit - After Computations and Validations"
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD HH24:MI''' ;
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT=''FRENCH''' ;
    Could you please investigate this problem.

    Paul,
    Thank you for the feedback and detailed reporting of this issue.
    This is a previously identified bug with the computation of the day component of the popup calendar.
    This correction will be available with the next HTML DB patch set and/or the release of HTML DB available later this year.
    Thanks again.
    Joel

  • Cannot find BLOB Download Format Mask link.

    Hello,
    I cannot find the "BLOB Download Format Mask" link and I am using a current version of APEX. can someone tell me where I might find it? I have followed the instructions and see no such link under Page Item, Source. Please help!
    Thanks
    LEH

    Scott,
    Yes, I have created a form on a table and that table contains a column of datatype BLOB. I followed the APEX advanced tutorial for uploading and downloading files. Now I want to be able to display the (Blob) images that I have uploaded.
    As I research the topic, I get the feeling that displaying the BLOB image can only be done in APEX 3.1 and up. Is this true? I have that version of APEX installed on my laptop and have successfully completed the "Defining and Viewing BLOB Data in Oracle Application Express 3.1" tutorial found here: http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    But I could not do it on the company server that runs APEX 3.0
    Even if I did get the approval to have the company APEX application upgraded to 3.1, there still is the issue of scaling the images so that they are not so large. I understand that there is a UTIL.APEX function "GET_BLOB_FILE_SRC" that would do this for me. I read the documentation at:
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/api.htm#CHDICGDA
    After reading it, I was still not clear as to how to use it correctly. Is there any documentation on how to implement this function in APEX?
    I did find something that I was hoping would help me. The article is entitled "Show Blob of other table in APEX Form" by Dimitri Gielis can be found here: http://dgielis.blogspot.com/2008/07/show-blob-of-other-table-in-apex-form.html
    I tried to import the file "blob_support.sql" application (on both APEX 3.0 and APEX 3.1 systems) but got errors. I'm not having very much luck here and would appreciate the help in pointing me in the correct direction.
    Help!!
    Thanks
    LEH

  • Sales Order - Unit Selling Price - Format Mask

    Hi,
    I want to change Format Mask of Unit Selling Price column on Sales Order Form. By using Forms Personalization it is not being done.
    Please guide me how could I change its format mask from 5 decimal places to 2 decimal places.
    Regards
    Waqas Hassan

    Hi Waqas,
    In the define Currency form in GL setup, change the existing currency code precision to 2.
    this should resolve your issue.
    Make sure you logout and login back to recheck the issue.
    General Ledger Super User-->Setup-->Currency-->Define.
    Thanks
    -Arif.

  • Numeriv format mask

    In a multirecord block I have a numeric field where I want to display numbers with decimals only if there are decimals (maximum number of decimals is two), also if the value is below zero I want to display a leading zero.
    Some examples.
    Value 1 displayed as 1
    Value 1,3 displayed as 1,3
    Value 0,3 displayed as 0,3
    If I try with format mask 9999d99 I get:
    Value 1 displayed as 1,00 (I don't want decimals for this value)
    Value 1,3 displayed as 1,30 (I don't want the last zero displayed)
    Value 0,3 displayed ,3 (I want a leading zero).
    Anyone who knows how to solve this?

    Hi Gerd,thanks for ur reply,
    But i need this in german.i don't know about any thing NLS.I have text box in there the user giving some discount.there the user will have to give like ex :12,99 instead of 12.99.
    Can u pls help me in this issue,tell me any code required for that or any triiger if so where we have write plss help in this issue
    Bit urget to the clinet.
    Regards
    Prasad

  • Format Mask for Germany

    Hi All,
    i have developed New Form for the German Client,In tht form i have one column for percent there the user will give 20,90 %.If i click Calculate button the calculation has to done based on that.
    Format Mask should be like 50,4 instead of 50.4
    If any one is having the code for that plss send me or let me know the process,
    help me in this issue..bit urget
    Regards
    prasad

    Have you tried setting profile option ICX: Numeric characters ?
    But very careful when you set this, better to set it at user/responsibility level.

  • Problem with Format Masks and Computations

    (I did a quick search on this, but didn't notice another thread on the topic. If there is already one I apologize.)
    We are using APEX version 2.2.1.00.04.
    I had an editable item that had the 999G990D00 format mask. In a computation I used that item and another item (that didn't have a format mask) to calculate a third item. The item I was trying to compute would not populate. It really had me stumped, so I went so far as to completely delete the fields and re-construct everything. When I did so the computation worked. That is until I put the format mask on the item again. I removed the format mask and the computation now works.
    Is this a known issue? Is it a bug? Am I doing something wrong?
    Thanks, Tony

    Tony,
    As Patrick mentioned, all variables in Apex are strings. Whenever you do something with them that effectively requires something other than a string value the database does an implicit type conversion. This often works, but not in cases where the db doesn't know how to do the conversion. For example, if your default database date format is dd-mon-yyyy and you have a string 10/09/2007 the database won't have any idea how to convert it to a date. That same is true for number formats.
    In your case, you used the number format mask in apex to convert a number to a string witht the given format. Apex does not do anything to convert it back to a number when you submit the page (unless you use the built in row processing). If you want to do anything with it as a number, you need to change it back with the to_number function. The second parameter is the format mask of the string you are passing in.
    Hope this helps,
    Anton

  • Number format mask of text item is not applied

    Hello all,
    I want to format a number like 999G999G999G999G990D00
    Is specify the format mask under source of the item. But it is not applied and I don't understand why.
    See http://apex.oracle.com/pls/otn/f?p=53873:2 for example
    Btw. is it possible to set the format for all numbers in the application at once? I want to have a thousand separator in most cases.
    Message was edited by:
    Jacob_B

    Hello Jacob,
    Btw. is it possible to set the format for all numbers
    in the application at once? I want to have a thousand
    separator in most cases.I am using substitution strings for things like that. You can define some "global" substitution strings on page application definition.
    So you just have to put in the format (999G999G999G999G990D00 ) in there once and give it a name. Let's say NUMBER_THOUSAND.
    Afterwards you can reference it wherever you need the format e.g. this way:
    to_char(10000,'&NUMBER_THOUSAND.').
    This way you just have one place where to change the format model.
    Regards,
    Tine

  • Problem with date format mask 'D'

    I am experiencing an extremely thorny problem with the date format mask ‘D’. I am trying to use it to check whether today is a Monday. The variable v_temp_day is set to sysdate. For the last 4 weeks the code has behaved erratically – giving a different result at 02:00 than at 10:30 even though it is only taking account of the date. In desperation I inserted a debug statement formatting the date in a variety of ways – with interesting results. Oracle is somehow managing to tell us that today is simultaneously Monday and Tuesday depending on which format mask you choose. Anyone got any thoughts or suggestions?
    PROC_ID TO_CHAR(STAMP_TIM
    EVENT_SQLERRM
    RRHKP010 17092007 02:00:00
    TO_NUMBER( TO_CHAR( v_temp_day, D ) ) = 2. TO_CHAR( v_temp_day, D ) = 2. TO_CHAR( v_temp_day, DY ) = MON. TO_CHAR( v_temp_day, DAY )
    = MONDAY . TO_CHAR( v_temp_day, Day DD-MON-YYYY HH24MISS ) = Monday 17-SEP-2007 020000. TO_CHAR( v_temp_day, D ) = 2.
    SQL> select to_char( sysdate, 'D' ) from dual ;
    T
    1

    My book says the trunc(d,'iw') will return "same day of the week as Jan 1st of that year"It's bad book.
    Please read about [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96540/functions176a.htm#80159]TRUNC & 'IW' Format Model and [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96529/ch3.htm#50331]Database Globalization Support Guide: First Calendar Week of the Year in the manual.

  • Changing the format mask of a numberic field in a  report

    Hi,
    I'm fethcing some numeric values from the DB and displaying them in the report. I'd like to use comma as the decimal separator but I can't get it to work. I'm very lost with all the NLS settings. I've tried using the format mask ad '9999990D00' but it still displays as dot as the decimal separator. What do I have to do in order to use comma as the decimal separator?
    Thanks

    Try putting
    SRW.DO_SQL('alter session set NLS_NUMERIC_CHARACTERS='', ''');
    in the Before Report Trigger.
    The setting might be reused for the next report if Reports is set to reuse the database connection.
    To avoid this, I guess you change it back to default in the After Report Trigger.
    Hope this helps!
    Morten

Maybe you are looking for

  • SharePoint 2013 RTM and WIndows Server Core 2012

    Hi, I've got a simple question I couldn't find the answer on the net. Is SharePoint 2013 officially supported (supported, not just working almost fine) by Microsoft if installed on a Windows 2012 Server Core? Does it depend on the roles of the farm?

  • Apple iPhone 5S blue screen and error 14 while restoring

    Got my new iPhone 5S for 2 weeks. Suddenly he became to show blue screen of death and restore after about an hour. I read, that it can be caused by iWork apps, but i didn`t even open them. After another blue screen iPhone moved in a cyclic reboot. Tr

  • Problem in posting multiple documents in FB70 through BDC...

    Hi,    I am facing a problem while posting multiple documents from a flat file in FB70 thourgh BDC batch input by using session method. However, the session is getting terminated after posting the first document. Please clarify my problem. Below is a

  • Opening a Word Document with a Java program in Windows

    When running a Java program in Windows, is it possible to have a button where when it is clicked it will open a Word document? If so, is it hard and can someone tell me how to do it?? Thanks

  • Link DMS document to a finance object

    Hello, As anybody succeeded to create a document link to finance object? I am now trying to create this link, and I as already read SAP Help about this topic. As far as I understand I need to: "1. Program two screens for the following module pools fo