format number mask: avoid the end by commas in integers

Hello

I export data from plsql via raw xml files

(my decimal separator is the comma "," but I don't think it's important)

When I export figures, I just concat tags with values.

I thought it was working OK, but the problem is that when the number is, for example, it 0.1234 showed

< value >.1234 < / value >

Instead of:

< value > 0,1234 < / value >

So I worked on this solution:

TO_NUMBER (myVar, 'FM9999999990D99999')

and it seems to work, but now with integer values, it sends a comma, like this back:

Select '< value > ' | TO_CHAR (1234, 'FM9999990D999999'). "< / value > ' from DUAL;

< value > 1234, < / value >

I can rtrim the comma, but... WTF!

Hello

If you really need, at least 1 digit before the decimal (when there is one), but no decimal separator when you do not, then I think that RTRIM is the easiest way and most effective to do so.

Post edited by: Frank Kulash

Sorry, I got your needs badly at the start.

Tags: Database

Similar Questions

  • format number according to the scope mask

    Hello

    How can I set the format number mask in a function with a subtraction, please?

    Example: <? xdofx:amount1 - amount2? >

    I tried without success:

    <? xdofx:amount1 - amount2:' #, # 0.00'? >

    <? xdofx:amount1 - amount2. » ##, ## 0.00' ? >

    <? xdofx:amount1 - amount2,' #, # 0.00'? >

    Could you please what is the correct syntax?

    Thank you

    Adriana

    Thanks for your answers, but the provisions still gave me a rendering error.

    I think that Oracle format functions allow you just to place a variable. It's my problem that I need to format subtraction. Who could confirm this syntax?

    Thank you

    Adriana

    It was a syntax problem, after all, I just need to use ' ' as delimiters for the variables!

    These examples of return values.

  • Autoruns from Microsoft adds a '1' at the end of each article, I am looking

    I just started using Autoruns from Microsoft. It's very good software, but I'm having a problem with the search online feature. Whenever need me to Google, it adds a number 1 at the end of the name of question that I am trying to research. I have to delete the 1 and then let Google find the info I need. How can I get rid of this behavior? Could not find it in the help file.

    I recommend posting your question in the Forum Windows Sysinternals Autoruns , where experts on this program may help you, and the FAQ might already have the answer.
    Boulder computer Maven
    Most Microsoft Valuable Professional

  • Change the mask of the executing (Oracle forms 6i) date field format

    Hello

    I use Oracle forms 6i. I have a domain where I use to store dates. I need to change the format mask of this date the runtime field.
    Y at - it no set_item_property built in that I can use to achieve this?


    Kind regards
    Bet.

    Published by: 1009523 on June 3, 2013 11:11

    Part 2, help information on the Format mask item property; you will need to make sure that you set the property correctly.

    Sorry, I had to drill two answers but my first attempt surpassed the eligible characters in an answer ;-)

    Format Mask property
    Description
    
    Specifies the display format and input accepted for data in text items.
    Applies to  text item
    Set  Form Builder, programmatically
    
    Refer to Built-in
    
    n     GET_ITEM_PROPERTY
    n     SET_ITEM_PROPERTY
    
    Required/Optional  optional 
    
    Usage Notes
    
    Valid format masks for character strings, numbers and dates are described in the following tables.
    Character Strings
    The following table describes valid format masks for character strings. 
    
    Element     Example     Description
    FM     FMXX99     Fill mode:  accept string as typed, do not right justify.  Allows end user input string to be shorter than the format mask.
    X     XXXX     Any alphabetic, numeric, or special character.  End user input string must be exact length specified by format mask.
    9     9999     Numeric characters only.  End user input string must be exact length specified by format mask.
    A     AAAA     Alphabetic characters only.  End user input string must be exact length specified by format mask.
    Character String Examples
    
    Format Mask     Description
    XXAA     Will accept: --ab, abcd, 11ab; will not accept: --11, ab11, or ab--(must use XX to accept hyphens and other special characters).
    XXXX     Will accept any combination of alphabetic, numeric, or special characters: --ab, abcd, 11ab, --11, ab11, or ab--.  Will accept 1234 or abcd; will not accept 123 or abc.  (To accept input string shorter than mask, use FMXXXX.)
    FMXX99     Will accept ab12, ab1, ab followed by two spaces; will not accept 12ab or abcd.  (To produce the Form Builder Version 3.0 Alpha datatype, use FMAAAAAA.)
    n     To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes (").
    n     Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them. 
    
    NUMBERS
    
    The following table describes valid format masks for numbers.
    
    Element     Example     Description
    9     9999     Number of nines determines display width.  Any leading zeros will be displayed as blanks.
    0     0999     Display leading zeros.
    0     9990     Display zero value as zero, not blank.
    $     $9999     Prefix value with dollar sign.
    B     B9999     Display zero value as blank, not "0".
    MI     9999MI     Display "-" after a negative value.
    PR     9999PR     Display a negative value in .
    comma     9,999     Display a comma in this position.  For correct behavior in multilingual applications, substitute G to return the appropriate group (thousands) separator.
    period     99.99     Display a decimal point in this position. For correct behavior in multilingual applications, substitute D to return the appropriate decimal separator.
    E     9.999EEEE     Display in scientific notation (format must contain exactly four "E"s).
    FM      FM999     Fill mode: accept string as typed, do not right justify.
    n     When you mask a number with nines (9), Form Builder adds a space in front of the number to accommodate the plus (+) or minus (-) sign.  However, since the plus sign is not displayed, it appears as if Form Builder adds a space in front of the number.  (The minus sign is displayed.)
    n     To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes (").
    n     Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them. 
    
    NUMBER Examples
    
    Format Mask     Description
    FM099"-"99"-"9999     Displays the social security number as formatted, including hyphens, even if end user enters only nine digits.To create a Social Security column, create an 11-character column, set to fixed length, with a format mask of 099"-"99"-"9999.  This mask will accommodate Social Security numbers that begin with zero, accepting 012-34-5678 or 012345678 (both stored as 012345678).
    99999PR     Accepts -123; reformats as <123>.
    999MI     Accepts -678; reformats as 678-.
    9.999EEEE     Displays as 1.00E+20.
    How Forms handles length mismatches
    
    If a runtime user enters a numeric string that exceeds the format mask specification, the value will be rejected.  For example:
    
    Format Mask     User enters     Result
    99.9     321.0     Invalid
    99.9     21.01     Invalid
    99.9     21.1     21.1
    99.9     01.1     1.1
    In contrast, if a numeric value fetched from the database exceeds the format mask specification for its display field, the value is displayed, but truncated, with rounding, to fit the mask.  (The item itself within the Forms application retains its full value.)  For example, if the database held the value 2.0666, and the format mask was 99.9, the value displayed to the user would be 2.1.  However, the value of the item within the form would be the full 2.0666. 
    
    Dates
    
    The following table describes valid format masks for dates.
    
    Element     Description
    YYYY or SYYYY     4-digit year; "S" prefixes "BC" date with "-".
    YYY or YY or Y     Last 3, 2, or 1 digits of year.
    Y,YYY     Year with comma in this position.
    BC or AD     BC/AD indicator.
    B.C. or A.D.     BD/AD indicator with periods.
    RR     Defaults to correct century.  Deduces the century from a date entered by comparing the 2 digit year entered with the year and century to which the computer's internal clock is set.   Years 00-49 will be given the 21st century (the year 2000), and years from 50-99 will be given the 20th century (the year 1900).
    MM     Month (01-12; JAN = 01).
    MONTH     Name of month, padded with blanks to length of 9 characters.
    MON     Name of month, 3-letter abbreviation.
    DDD     Day of year (1-366).
    DD     Day of month (1-31).
    D     Day of week (1-7; Sunday=1).
    DAY     Name of day, padded with blanks to length of 9 characters.
    DY     Name of day, 3-letter abbreviation.
    J     Julian day; the number of days since January 1, 4712 BC.
    AM or PM     Meridian indicator.
    A.M. or P.M.     Meridian indicator with periods.
    HH or HH12     Hour of day (1-12).
    HH24     Hour of day (0-23).
    MI     Minute (0-59).
    SS     Second (0-59).
    SSSSS     Seconds past midnight (0-86399).
    /. , .     Punctuation is reproduced in the result.
    "..."     Quoted string is reproduced in the result.
    FM     Fill mode: assumes implied characters such as O or space; displays significant characters left justified.  Allows end user input to be shorter than the format mask.  (Use in conjunction with FX to require specific delimiters.)
    FX     All date literals must match the format mask exactly, including delimiters.
    n     When you prefix a date mask with FX, the end user must enter the date exactly as you define the mask, including the specified delimiters:  
    
    Date Examples
    
    Format Mask     Description
    FXDD-MON-YY     Will accept 12-JAN-94, but will not accept 12.JAN.94 or 12/JAN/94 because the delimiters do not match the mask. Will not accept 12JAN94 because there are no delimiters.  Will accept 01-JAN-94 but will not accept 1-JAN-94.
    FMDD-MON-YY     Will accept 01-JAN-94.  Will also accept the entry of other delimiters, for example 01/JAN/94 and 01 JAN 94.  However, will not accept 01JAN94.  Will accept 1-JAN-94, converting it to 01-JAN-94.
    DD-MON-YY     Will accept 12.JAN.94, 12/JAN/94 or 12-JAN-94. Note: Any delimiter characters will be accepted, but if delimiters are omitted by the end user, this mask will interpret date characters as a delimiters.  Will accept 12-JAN94, (but will erroneously interpret as 12-JAN-04); but will not accept 12JAN94, because "AN" is not a valid month name.
    n     Use of a format mask only affects how the data looks.  Form Builder stores full precision, regardless of how the data is presented.
    n     Embedded characters are separate from text item values and are not collated along with text item values, even when the end user enters them.
    n     To embed additional characters such as a hyphen (-) or a comma (,), surround the character with double-quotes (").  Note, however, that double-quotes themselves cannot be used as a character.  In other words, trying to achieve output of DD"MM by specifying a mask of DD"""MM would not work.
    
    Format Mask     Description
    FMMONTH" "DD", "YYYY     Displays the text item data in the specified date format: JANUARY 12, 1994, including the appropriate blank spaces and comma.
    FMDD-MONTH-YYYY     Displays as 12-JANUARY-1994.
    DY-DDD-YYYY     Displays as WED-012-1994.  Note: for input validation including day of the week, a mask that allows specific determination of the day is required, such as this example or DY-DD-MM-YY.
    n     When you use day of the week formats, be sure that the data  includes day of the week information.  To avoid illogical masks, display also either the day of the year (1-366) or the month in some format. 
    
    Format Mask     Description
    DD-MONTH-YYYY     Displays as 12-JANUARY-1994.
    DY-DDD-YYYY     Displays as WED-012-1994.
    DY-DD-MON-YY     Displays as WED-12-JAN-94.  Be sure to include month.  Avoid masks such as DY-DD-YY, which could generate an error.
    NLS Format Masks
    
    The following table describes valid National Language Support (NLS) format masks.
    
    Element     Example     Description
    C     C999     Returns the international currency  symbol.
    L     L9999     Returns the local currency  symbol.
    D     99D99     Returns the decimal separator.
    G     9G999     Returns the group (thousands) separator.
    comma     9,999     Displays a comma in this position.
    period     9.999     Displays a decimal point in this position. Displays a decimal point in this position.
    NLS Format Mask Examples
    
    Format Mask     Description
    L99G999D99     Displays the local currency symbol, group, and decimal separators:  if NLS_LANG=American, this item displays as $1,600.00; if NLS_LANG=Norwegian, this item displays as Kr.1.600,00.
    C99G999D99     Displays the appropriate international currency symbol: if NLS_LANG=American, this item displays as USD1,600.00; if NLS_LANG=French, this item displays as FRF1.600,00. 
    

    Craig...

  • How to create certain number of spaces at the end of all records

    Hello

    I'm queue the select query, where each column value must take a position.

    I need to also have a certain number of spaces at the end of each record.

    How to make spaces at the end of the recording.

    Is anything order them to be included in the select query to get spaces at the end of the recording.

    details of the file is like this:-

    NAME OF FIELD FIELD DECRIPTION POSITIONS SIZE FORMAT
    RECORD TYPE 1 1 'R' ALPHA
    EMP N ° 2-4 5 DIGITAL EMP_NO
    SPACES of 6-11 6 SPACES-> HOW to GET THE NUMBER SPACES ESPECIALLY... HOW TO WRITE THE SELECT QUERY TO GET THESE IN THE HOLD FILE.

    THANKS in advance...

    Maybe just do a simple function that returns a string of spaces given the desired number of places?

    Published by: TimS on August 6, 2009 16:06

  • I try to get my printer to print a document, it goes through the indices of normal routine but in the end, it shows the number of the DOCUMENT to print.

    Whenever I try to access my printer to print a document, it goes through the indices of normal routine but in the end, it shows the number of the DOCUMENT to print.

    Original title: printer

    What kind of printer do you use? You use the latest drivers on the manufacturers website? Where are you seeing the printing error DOCUMENT No.?

  • BlackBerry smartphones dial # at the end of a phone number

    BB starting and have new tour - how to compose the # at the end of the phone number or inside a call? I tried alt Q and find an option show-keyboard - and have had no success.

    Thank you!

    Cool!
    I'm glad that you fixed it.
    Please solve the thread so that others can find your answer faster.
    Thank you

    Bifocals

  • Hello, how get the permit numbers on site licenses (LWS), the identification number of the end user, nothing happens. Thank you

    Hello, how get the permit numbers on site licenses (LWS), the identification number of the end user, nothing happens. Thank you

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Random letters missing at the ends and middle of phrases in pdf format.

    Hello!

    I don't know what to do to solve this problem.  I converted an indesign file to PDF, crossed all the pre-flight, without error, and the pdf result ran out of random letters. There are a few at the end of the phrases, but sometimes the letters in the middle of a sentence, although usually before a comma. Is this a known error? Has anyone experience / solved this problem?

    Thank you!

    Hello

    What version of Acrobat is installed on your machine?

    What operating system do you use?

    Do you experience the same behavior with any other file as well?

    Also check if Acrobat is updated to the latest patch or not.

    Concerning

    Sukrit diallo

  • Error in the library: "year error occurred importer"Google Analytics Lite.mulib"library,"295"unexpected format number.» Check if there is a newer version of Muse.

    Hello

    I have an error in the library trying to install the add-in 'google' analytical... the error that says:

    «Year error occurred importer "Google Analytics Lite.mulib" library, "295" unexpected format number.» Check if there is a newer version of Muse.

    I can not install anything in the library because I get different errors at each facility.

    Thank you05 Web02.jpg

    The 32-bit versions and 64-bit of Muse are not compatible. The 32-bit version is version 7.4. The 64-bit version is 2014.3.2 (the equivalent of 11.2). Files or created using 2014.3.2 library items cannot be used Muse 7.4.

    On a 64-bit computer, the 32-bit versions and 64-bit of Muse will be installed side-by-side. If you receive this error on the 64-bit computer, then you probably not launch the 64-bit version of Muse. (Note that the user interface of the 64-bit version is much more recent and very different from the 32-bit version. If Muse looks the same on both computers, then you are definitely not lance 64-bit on a 64-bit machine.)

    The short answer about the library item, is that it requires the latest version of Muse. It may appear in the Panel in version 7.4, but it cannot be used here. It relies on functionality that is not part of 7.4.

  • I need a phone number so that I can cancel my order before the end of the year to the top

    I need a phone number so that I can cancel my order before the end of my term

    Go to http://helpx.adobe.com/contact.html?step=ACOM-XCPF-ECHG-XEPF-FPDF-SEND-AcrobatCom_membersh ip-account-payment and click on the still need help? button.

  • How to add a string to the end TLFTextField without losing the current text format!

    • I have a TLFTextField which loads the text of the external text file.
    • Then a function changes the format of certain parts.
    • Then, as soon as I add a string to the end my TLFTextField, all previous formatting is lost!

    I use this code to add the string:

    • myTLF.text += ".";

    or

    • myTLFText.text = myTLFText.text.concat(".");

    Should I use another method?

    Sample.png


    pass again the text through your function put shaped, or try appendText:

    • myTLF.appendText(".");
  • Tab automatically when you reach the end of a field with the number of limited characters

    Hello!

    Is it possible to activate an automatic tab behavior when the user reaches the end of a field with the number of limited characters?

    I'd like the cursor to move to the next field in tab order automatically.

    Possible?

    Thanks for the tips!

    Marcos

    Hello

    What happens if you tried something like the following example? This works using formCalc on the change event for the user's domain is currently typing in:

    fullCount var = 3
    var currentString = xfa.event.newText
    If (Len (currentString) > = fullCount) then
    xfa.host.setFocus ("TextField2")
    endif

    Or, if you prefer javaScript:

    fullCount var = 3;
    var currentString = xfa.event.newText;
    If (currentString.length > = fullCount) {}
    xfa.host.setFocus ("TextField2");
    }

    These work very well.

    I hope this helps!

    Stephen

  • Eliminating the comma at the end of the production

    My current performance of dynamic names in my variable (called dynNames) has a comma at the end.

    I need remove the last comma:
    Jones, Smith, Baker, Johnson.

    to look like this:

    Jones, Smith, Baker, Johnson


    My attempt to remove the last comma does not work because it eliminates all commas:


    < cfset myNames = REReplace (dynNames, ", $" "","All" ") >

    < cfoutput > #myNames < / cfoutput >


    Output of my bad attempt:
    Jones Smith Baker Johnson

    Please notify.


    #id #.





    #dynNames #.

  • Add name, address & telephone number at the end of e-mail.

    Where can I go in my Hotmail so that I can add my name, address & phone numbers at the end of my email.

    Thank you

    How to add a signature...

    http://Windows.Microsoft.com/en-CA/Windows-Live/Mail-create-signature

Maybe you are looking for

  • How to create a shortcut to the desktop as with IE?

    I changed my browser "Firefox" to "Internet Explorer and I would like to know how to create a shortcut to my desktop."

  • Is iCloud photo one 'off site' upward?

    While I use a backup device for time machine (airport Time Capsule), this device is in my house and my Mac... I also have and use iCloud photo. Is iCloud photo a "off site backup" in case my Mac and airport Time Capsule are lost in say a fire in my h

  • AppleScript/Pages can not find the open document

    This very simple script will not work: Tell application "Pages". activate say the document before name tell the end tell the end All of this has to do is give the name of the opened document. It says: "cannot get document 1. Invalid index. "And, Yes,

  • How to call a project to another project?

    I have two different projects, one of which takes place in the individual project. At some point, I need to call the project on the other. But its showing the error message next message, whenever I tried to create the object for the other UiApplicati

  • There was a problem starting msiihy32.dll that the specific module could not be found?

    When I start my computer, I got this message there is a problem starting msiihy32.dll the specific module could not be found, and I downloaded the msiihy32.dll, but still have the message so what can I do?