Decimal characters

We have many varchar2 columns in the database which can contain, for example '24.00' (here "." is the decimal separator), but when i run the following query on my machine i got that error
SQL> select to_number('24.99') from dual;
select to_number('24.99') from dual
ORA-01722: invalid number
SQL> However, for example on other machines, it executes successfully. If i run select to_number('24*,*99') from dual , it executes successfully.
I know this can be avoided by using a mask in to_number, but i don't want this.
I tried to set the "." as the decimal separator from Control Panel -> Regional and language settings, but with no effect.
The db version is Oracle Database 11gR2 (
Edited by: Roger22 on 28.12.2012 13:53

See this demo in detail :
Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select value from nls_session_parameters
  2  where parameter = 'NLS_NUMERIC_CHARACTERS'
  3  /
SQL> select to_number('24.99') from dual;
I did not not got any error, because my  'NLS_NUMERIC_CHARACTERS' are .,  Ok, what if I change it to your environment :
SQL> alter session set NLS_NUMERIC_CHARACTERS=',.';
Session altered.
SQL> select to_number('24.99') from dual;
select to_number('24.99') from dual
ERROR at line 1:
ORA-01722: invalid number
This is your error position in the question.
SQL> select to_number('24.99','99D99','nls_numeric_characters=.,') VALUE FROM DUAL;
and this is the solution.
SQL> alter session set NLS_NUMERIC_CHARACTERS='.,';
Session altered.
SQL> select to_number('24.99') from dual;
SQL>If you wish that it should be ., for ever, you can say :
alter system set NLS_NUMERIC_CHARACTERS='.,' scope=spfile; and restart the database. (when ever you can take down time of the database, till then you can use alter session.. as per above command)
Girish Sharma

Similar Messages

  • Grouping and Decimal characters in rtf templates.

    Hi guys and girls,
    I’m really struggling with a problem here regarding the decimal characters for the prices in my output.
    I'm using XML Publisher 5.6.3.
    My goal is to control the grouping and decimal character from my template.
    The numbers in the XML data file can either be 10.000,00 or 10,000.00. The format is handled by the users nls_numeric_characters profile option.
    The output of the template shall be based on the locale and not the data generated by Oracle Reports. For example: Reports to US customers shall show the numbers in the following format 10,000.00. Reports to our European customers shall show the numbers in this format 10.000,00.
    How can I achieve this in my templates? Can it be achieved at all?
    Thank you in advance.
    Kenneth Kristoffersen
    Edited by: Kenneth_ on May 19, 2009 1:30 AM

    Thank you for your reply.
    The problem is that the report is generating the output based on the users profile option nls_numeric_characters.
    I have tried to override the users profile option in the before report trigger without any luck. I can alter selects so the query gets the numbers in the right format but then I would have to go through all queryes and reports which seem a bit wrong? Especially for the standard Oracle reports.
    BR Kenneth

  • Convert date and time in decimal characters

    I need to convert the date ad the time in decimal characters.
    Any idea to do this ?
    TNX in advance for your help

    Please find the attached example. It displays the current time in time format, and it also has separate numeric indicators for hours, minutes, seconds.
    If this is not what you were trying to do, please elaborate on your question.
    The VI was created with LabVIEW 6.1
    Zvezdana S.
    National Instruments
    Attachments: ‏40 KB

  • Decimal places in the BCC field

    I created a field in the xml to save a field of type double, but only allows up to three decimal places.
    <property name="freight" data-type="double" column-name="freight" display-name-resource="freight" category-resource="categoryBasics" >
         <attribute name="propertySortPriority" value="50" />
    with sql for the column freight
    number(28, 20)
    I noticed that this also occurs in other fields in BCC,
    Is it possible to increase the number of decimal places for a property?

    I created the view mapping as your orientations and looked like this
    <add-item item-descriptor="itemMapping" id="AmImTest">
      <set-property name="itemName"><![CDATA[test]]></set-property>
      <set-property name="description"><![CDATA[AssetManager Test itemMapping]]></set-property>
      <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
      <set-property name="viewMappings"><![CDATA[ivM1]]></set-property>
      <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
      <set-property name="itemPath"><![CDATA[/atg/multisite/SiteRepository]]></set-property>
      <set-property name="name"><![CDATA[AssetManager]]></set-property>
    <add-item item-descriptor="itemViewMapping" id="ivM1">
      <set-property name="propertyMappings"><![CDATA[propertyViewMapping=pvM1]]></set-property>
      <set-property name="attributeValues"><![CDATA[includedProperties=av1]]></set-property>
      <set-property name="displayName"><![[scopus.geralProperties]]></set-property>
      <set-property name="name"><![CDATA[ item View Mappi]]></set-property>
    <add-item item-descriptor="attributeValue" id="av1">
      <set-property name="value"><![CDATA[id,name,description,freight]]></set-property>
    <add-item item-descriptor="propertyViewMapping" id="pvM1">
      <set-property name="propertyView"><![CDATA[pv1]]></set-property>
    <add-item item-descriptor="propertyView" id="pv1">
      <set-property name="description"><![CDATA[BIZUI Basic editor for double properties with more than 3 decimal characters.]]></set-property>
      <set-property name="attributes"><![CDATA[inputFieldMaxlength=pvAtrDef1]]></set-property>
      <set-property name="mode"><![CDATA[aMgrMmView]]></set-property>
      <set-property name="isComponentPropertyView"><![CDATA[false]]></set-property>
      <set-property name="isReadOnly"><![CDATA[false]]></set-property>
      <set-property name="type"><![CDATA[double]]></set-property>
      <set-property name="name"><![CDATA[SCO BIZUI with more than 3 decimal characters.]]></set-property>
    Did I missed something?

  • Decimal Notation while displaying outputs

    Hi All,
    There are two typs of decimal notations first is 1,000.00 and other is 1.000,00.These are maintained in user profile settings. Are these specific to countries also?
    If I want to display amount in the output with correct decimal notation, decimal notaion at which level should be considered User level or Country level?
    please reply.

    If we specify the country key  the system do not consider the settings from the user master record and searches table T005X for the country key. If the country key exists, the system sets sy-subrc equal to 0 and formats the output of all  the 'WRITE' statements according to the settings defined in T005X. If the country key you specified does not exist, the system sets sy-subrc equal  to 4 and formats for all 'WRITE' statements with the decimal characters as period '.'.
    thinking on this point of view its better to specify the country key......

  • Right Justify Numbered List

    In a very simple table, within Pages Layout - I want to list 10 numbered items and have the numbers be right justified. not the entire text, just the numbers. I do not find a way to do that. Thanks for any help.

    fruhulda wrote:
    I think OP is talking about a Table in Layout mode. If you have both text and number in the same cell you need to use tab BUT in a table you have to hold down the Alt key when using the Tab key, otherwise you only move to the next cell. In the Inspector you can change it to a right adjusted tab.
    Is that working for you?
    Here on my machine, if I put a decimal tab stop in the cell's ruler,
    the number aligns correctly when I insert a tab (alt + tab)
    but it returns to the left side when I leave the cell.
    It seems that the feature was designed for the old tables (those in iWork 1 and 2) but fails with the tables using the Numbers structure.
    Only the alignment buttons give a correct behavior (but the decimal characters are aligned only if the number of decimals is fixed and if the font used is a monospaced one. Boring, isn't it ?
    Yvan KOENIG (from FRANCE dimanche 14 juin 2009 19:06:04)

  • Regex in transport rule - strange behavior

    I have Exchange 2010 SP3
    I try to create transport rule that take action on emails contains specific phrases in subject or body (for example:
    special offer). So I use predicate SubjectOrBodyMatchesPatterns
    but this won't work when I type: cool special offer
    How to buid expression to catch more complex strings like: do't tell true,
    do't tell him true

    I've studied almost whole internet to find an answer ;)
    I know that Exchange "regular expressions" are not exactly regular expressions, so that name is little exagerrated by Exchange folks ;) I cannot achieve expected results looking on
    Maybe that "(not)regular expressions" are working fine on decimal characters, but definetely not on strings. Or maybe the reason is that my emails language are not english?

  • Decimal Places in Item Cost must be 6 characters while in Journal Entry 2.

    I have the following problem:
    Accounting needs to see and work with 2 decimal places, but the item cost is needed in 6 decimals.
    If I register a A/P Invoice and i go to the Journal Remark, the Journal Entry should be in 2 decimals. If i look for the Item Cost on the Wharehouse this cost should be in 6 decimals.
    Is there a way to handle Accounting in 2 units and Cost in 6 Units
    Thank You very much

    Hi Saul,
    The request appears illogical, how can the accountant work with 2 decimal places & the item valuation is held with 6? The stock account with 2 decimals will never match the stock audit report with 6 decimals.
    I'm afraid the SAP Business One core functionality does not cater for this need. There are no 'behind the scenes' journal entries. A JE is legally binding so you need to decide whether you wish to work with the most accurate calculations regarding item cost as possible (6 decimals) or accommodate the accountants & work with 2 decimals in the journals.
    You might want to take the nature of the stock into consideration, if there are huge quantities at small individual prices 6 decimals might be better, if you use mainly standard cost &/or have no major cost fluctuations when using MAP/FIFO, 2 decimals might be sufficient.
    All the best,

  • Wrong ASCII values for control characters in Variables and Stack Call in CVI2013?

    I think there is an error in  "Variables and Call Stack" window if you want to look for your variables in ASCII format.
    The control characters (0 -  31) are not shown correct. They are shifted 2.
    For example:
    Character in Decimal format is 10 (LF) but when you are chancing to ASCII format it is showing \012.
    The same with 13 (CR). This character is \015 in ASCII format.
    I think that was no problem in CVI2012.
    Best regards
    Go to Solution.

    I'm not using CVI2013 yes so I cannot respond regarding this specific product, but the code you are showing are the octal equivalent of the decimal value you specified: it could be that control characters (or generally speacking non-printable ones) are replaced with their octal equivalent in string view.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Decimal upto 3 places in ALV report output

    Hi Experts
    My requirement is that User wants to have 3 decimal places in report output.I have used type P decimal 3,also have used field catalog Decimals_o = '3' .In the report output Lets say Previously it was 123 now after the changes its coming 123.000 but its only virtual when i try to edit that it takes only upto 4 characters like 123.???I think because the datatype defined is NUMC and its limited to 4 characters only so it is not allowing to enter more than 4 characters??Please suggest me a way?sud I change   the NUMC to 6 characters as it is standard??sud I make changes in it??
    Thanks & Regards

    i have tried that but still it takes 4 characters in output.pasting the code
    1)The declaration part
    DATA : gv_gjahr TYPE gjahr,
           gv_plant TYPE cciht_ial-iaplant.
                    s_gjahr FOR gv_gjahr NO INTERVALS NO-EXTENSION OBLIGATORY.
    CONSTANTS : c_x          TYPE c VALUE 'X',
                c_celltab(7) TYPE c VALUE 'CELLTAB',
               c_gjahr(5)   TYPE c VALUE 'GJAHR',
                c_april(5)   TYPE c VALUE 'APRIL',
                c_may(3)     TYPE c VALUE 'MAY',
                c_june(4)    TYPE c VALUE 'JUNE',
                c_july(4)    TYPE c VALUE 'JULY',
                c_augus(5)   TYPE c VALUE 'AUGUS',
                c_septe(5)   TYPE c VALUE 'SEPTE',
                c_octob(5)   TYPE c VALUE 'OCTOB',
                c_novem(5)   TYPE c VALUE 'NOVEM',
                c_decem(5)   TYPE c VALUE 'DECEM',
                c_janua(5)   TYPE c VALUE 'JANUA',
                c_febru(5)   TYPE c VALUE 'FEBRU',
                c_march(5)   TYPE c VALUE 'MARCH',
                c_rw(2)      TYPE c VALUE 'RW',
                c_ro(2)      TYPE c VALUE 'RO'.
    TYPES : BEGIN OF ty_envtran,
              envno TYPE numc3,
              envlx TYPE zehenvlx,
              plant TYPE ccihe_iaplant,
              gjahr TYPE gjahr,
              april  TYPE numc4,
              may   TYPE numc4,
              june  TYPE numc4,
              july  TYPE numc4,
              augus TYPE numc4,
              septe TYPE numc4,
              octob TYPE numc4,
              novem TYPE numc4,
              decem TYPE numc4,
              janua TYPE numc4,
              febru TYPE numc4,
              march TYPE numc4,
            END OF ty_envtran.
    DATA: gt_envtran TYPE TABLE OF ty_envtran,
          gs_envtran TYPE ty_envtran,
          gt_envmast TYPE TABLE OF zehs_envmast,
          gs_envmast TYPE zehs_envmast.
    DATA: save_ok     LIKE sy-ucomm,
          g_container TYPE scrfname VALUE 'ZEHS_ENVIRONMENTS_CC1',
          g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout   TYPE lvc_s_layo,
          g_success   TYPE c,
          gv_success  TYPE c,
          gt_envtran3 TYPE TABLE OF ty_envtran,
          gs_envtran3 TYPE ty_envtran,                          "#EC NEEDED
          gt_envtran2 TYPE TABLE OF zehs_envtran,
          gs_envtran2 TYPE zehs_envtran.
    DATA: BEGIN OF gt_outtab OCCURS 0.     "with header line
    DATA: envlx TYPE zehenvlx,
          gjahr TYPE gjahr,
          april TYPE numc4,
          may   TYPE numc4,
          june  TYPE numc4,
          july  TYPE numc4,
          augus TYPE numc4,
          septe TYPE numc4,
          octob TYPE numc4,
          novem TYPE numc4,
          decem TYPE numc4,
          janua TYPE numc4,
          febru TYPE numc4,
          march TYPE numc4,
          plant TYPE ccihe_iaplant,
          envno TYPE numc3.
    DATA: celltab TYPE lvc_t_styl.
    DATA: END OF gt_outtab.
    DATA: gs_outtab LIKE LINE OF gt_outtab.
    2)The Field catalog part
    LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN c_APRIL.
            ls_fcat-scrtext_l = 'April'(c01).
            ls_fcat-scrtext_m = 'Apr'(c13).
            ls_fcat-scrtext_s = text-c13.
          WHEN c_MAY.
            ls_fcat-scrtext_l = 'May'(c02).
            ls_fcat-scrtext_m = 'May'(c14).
            ls_fcat-scrtext_s = text-c14.
          WHEN c_JUNE.
            ls_fcat-scrtext_l = 'June'(c03).
            ls_fcat-scrtext_m = 'Jun'(c15).
            ls_fcat-scrtext_s = text-c15.
         WHEN c_JULY.
            ls_fcat-scrtext_l = 'July'(c04).
            ls_fcat-scrtext_m = 'Jul'(c16).
            ls_fcat-scrtext_s = text-c16.
          WHEN c_AUGUS.
            ls_fcat-scrtext_l = 'August'(c05).
            ls_fcat-scrtext_m = 'Aug'(c17).
            ls_fcat-scrtext_s = text-c17.
          WHEN c_SEPTE.
            ls_fcat-scrtext_l = 'September'(c06).
            ls_fcat-scrtext_m = 'Sep'(c18).
            ls_fcat-scrtext_s = text-c18.
          WHEN c_OCTOB.
            ls_fcat-scrtext_l = 'October'(c07).
            ls_fcat-scrtext_m = 'Oct'(c19).
            ls_fcat-scrtext_s = text-c19.
          WHEN c_NOVEM.
            ls_fcat-scrtext_l = 'November'(c08).
            ls_fcat-scrtext_m = 'Nov'(c20).
          WHEN c_DECEM.
            ls_fcat-scrtext_l = 'December'(c09).
            ls_fcat-scrtext_m = 'Dec'(c21).
          WHEN c_JANUA.
            ls_fcat-scrtext_l = 'January'(c10).
            ls_fcat-scrtext_m = 'Jan'(c22).
            ls_fcat-scrtext_s = text-c22.
          WHEN c_FEBRU.
            ls_fcat-scrtext_l = 'February'(c11).
            ls_fcat-scrtext_m = 'Feb'(c23).
            ls_fcat-scrtext_s = text-c23.
          WHEN c_MARCH.
            ls_fcat-scrtext_l = 'March'(c12).
            ls_fcat-scrtext_m = 'Mar'(c24).
            ls_fcat-scrtext_s = text-c24.
    Note: I have already tried giving DECIMALS_O,OUTPUTLEN,DATATYPE,FIELDCAT-REF_FIELD ,FIELDCAT-REF_TABLE BUT but still it takes upto 4 characters in output.

  • Convert integers to equivalent characters in string - NOT ASCII code character

    I have to output my data and associated string information to a string array and then to a spreadsheet file.
    I want to do this by converting integers (and other numbers) to an identical string of characters.
    I have tried Type Cast with a string constant as the type input but it DOES NOT WORK.  Instead, I get the ASCII character whose numerical designation matches the integer, e.g. integer "50" become capital "P".
    I want integer "50" to be string "50".
    Please advise and no, I do not want to make arrays of clusters.
    Go to Solution.

    I found my answer but only after searching for "Number" conversion rather than "Integer" conversions.
    In the Programming palette  - String Functions - String/Number Conversion - Number to Decimal String:
    "Converts number to a string of decimal digits at least width characters wide or wider if necessary. If number is floating-point, it is rounded to a 64-bit integer before conversion."

  • Converting non-ascii characters generated by MS word

    I've encountered some files that were originally exported from MS Word as html. The problem is they contain some characters that fall into the 128 to 255 range. Some appear to be fancy quotes and apostrophes, but others I just can't figure out. On a mac or Firefox on windows they appear as:
    Ö ë í ì î ñ ô † © Æ ∑ ∆ “ ÷ › · Î Ï Ì Ó Ô Ò Ù
    The decimal values of the above chars are:
    133 145 146 147 148 150 153 160 169 174 183 198 210 214 221 225 235 236 237 238 239 241 244
    As charater entities they appear as:
    … ‘ ’ “ ” – ™ © ® · Æ Ò Ö Ý á ë ì í î ï ñ ô
    Before I try to reinvent a square wheel, I thought I'd ask here if anyone knows of an existing command line tool that might help with this.
    15 PB   Mac OS X (10.3.9)  

    Thanks for all the replies. I think I've solved the problem. It indeed was a problem with high bit WinLatin1 (cp 1252) characters. Here's a technote that discusses the problem. So I wrote a short perl script based on this table:
    <pre style="overflow: auto;font-size:small; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #ddd; padding: .3em .8em .3em .8em; font-size: 10px;">#!/usr/bin/perl -wpi
    # Define an array for double byte unicode characters
    # Undefined characters are marked as 0.
    my @uni = (
    8364, 0, 8218, 402, 8222, 8230, 8224, 8225,
    710, 8240, 352, 8249, 338, 0, 381, 0, 0,
    8216, 8217, 8220, 8221, 8226, 8211, 8212,
    732, 8482, 353, 8250, 339, 0, 382, 376
    # Characters 128 through 159 are mixed set of double byte unicode characters,
    # so get these out of our $uni array. Undefined characters in this range are deleted.
    s/([\x80-\x9f])/ $uni[ord($1)-128] ? sprintf("&#%d;", $uni[ord($1)-128]) : ""/eg;
    # Characters 160 through 255 can be used as is.
    s/([\xa0-\xff])/sprintf("&#%d;", ord($1))/eg
    </pre>I only hope that perl is clever enough to not create the $uni array for each line. Anyone happen to know?
    Thanks for any tips.

  • Only VBA does not recognize non-English characters

    Hello guys,
    I have a new laptop with Windows 8.1 bought in the USA and I'm having a difficulties with Excel VBA (Office 365 University-64x bought in the Czech Republic - Central Europe). The VBA does not recognize non-English characters (particularly "ř" and
    "ů") which causes me problem when running some codes that I wrote earlier on my previous laptop (Windows 7, bought in the Czech Republic with the same Office). 
    The problem with non-English characters has occurred only in VBA so far, otherwise I can use these characters normally in Excel cells, Word... I tried to install both English and Czech version of the Office with no change, I also installed Czech proofreading
    tools and set everything to Czech in the Office. The location and language preferences in the Windows are also set up to Czech. And it is not a problem of a font. I also mentioned that when I tried to look up these characters, using Ctrl+F, it changes
    original ř to r after a search and again this is only an issue of the VBA.   
    Thank you very much for any help.

    Hi Tom,
    VBA for Excel can only recognize ASCII code from 0 to 255, if you use other special characters like "ř" or "ů", it will returns 63(?) to you. To use this kind of characters, you have to utilize ChrW function to parse a decemal to the
    for example, the hex code and dec code for these two characters are as below:
      Hex   Dec
    ř 159   345
    ů 016F  367
    So to get these two characters in VBA, you could code as below:
    ChrW(&H159) or ChrW(345)
    ChrW(&H16F) or ChrW(367)
    You can get the hex code of the character by searching in the system character map(in the Win8.1 start view, search "character map"), then convert the hex code to decimal code by yourself.
    Range("A1").Value = ChrW(&H159) & ChrW(&H16F)
    Range("A1").Value = ChrW(345) & ChrW(367)
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    HERE to participate the survey.

  • Converting a hexadecimal string to ASCII-characters.

    I have long hexadecimal strings that I wish to convert to their corresponding ascii-characters. I know there are a series of functions for doing things like this - hex to number, number to string etc.
    At the moment, however, I am stuck at entering the hexadecimal string. I connect it to "hexadecimal string to number". What I get out is the decimal value of the two last digits of the hexadecimal number. No other wires are connected to the function. This means data is lost. How do I get around this? Is this particular function at all suitable for what I am trying to do?

    Hi Tzench,
    "hexadecimal string" isn't very accurate and conversion questions have been discussed many times before...
    See example on conversion of two different "hexadecimal" strings. There are other conversion methods, but those are most easiest to understand
    Message Edited by GerdW on 12-08-2008 11:27 AM
    Best regards,
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments: ‏35 KB

  • Need help in replacing special characters in a string

    please let me know the best way to replace all the special characters in a string with space.
    other than alphabets and numbers
    with regards.

    please let me know the best way to replace all the special characters in a string with space.
    other than alphabets and numbers
    Sumanth Nag Kristam wrote:
    > actually i need to replace hexa decimal char 0X1A in a string.... that is 'substitue' as per the chart
    > any pointers....
    > chk the link for the ASCII codes
    But in Hexa decimal value there is no special characters?

Maybe you are looking for

  • YOSEMITE IS SLOW: How to browse folders quickly in Finder?

    Hi all, I've noticed my Mac Mini mid2011 is slow at browsing folders and files in Finder. How can I make this process snapier? I just switched to browsing via "list mode" instead of Cover Flow and this seems to have helped. What else can I do? Thanks

  • Quicktime grabbing MP3 downloaded files!

    Hi folks, I am downloading some songs from (very very cheap mp3 site) and they are downloaded as iTune files (which is what I require), however, when they download fully they become Quicktime files! I now have to change them individually

  • Dreamweaver crashes on startup - check the Common folder

    CS3 build3841 and OSX 10.5.8 I tried deleting Dreamweaver sitecache and configuration folder, but nothing worked.  I noticed a folder named "9" in the Common folder here: /Users/[username]/Library/Application Support/Adobe/Common/9 I renamed it to "9

  • Integrating BI based on the BI SAP QUERY CONNECTOR

    Hi, I'am new to BI,i want to use BI in VC,for this i need to integrate BI based on BI SAP QUERY CONNECTOR. Anybody please provide me a clear  documentation on this integration. With Regards, Praveen


    I'm going to create a program to rebatch FG with unit of issue BOX and stock status as available in full single bin. My process is 1 select goods movement data from LQUA 2 post goods movement using records on each bin by call BAPI_GOODSMVT_CREATE 3 c