XMLELEMENT and decimal numbers

Hello members,

I just encountered a problem, indicating that XMLELEMENT depends on NLS parameters.
SQL> alter session set nls_numeric_characters = ',.'
  2  /

Session altered.

SQL> select xmlelement("x",1.23) from dual
  2  /

XMLELEMENT("X",1.23)
-----------------------------------------------------------------
<x>1,23</x>

SQL> alter session set nls_numeric_characters= '.,'
  2  /

Session altered.

SQL> select xmlelement("x",1.23) from dual
  2  /

XMLELEMENT("X",1.23)
-----------------------------------------------------------------
<x>1.23</x>

SQL> select *from v$version
  2  /

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production

SQL>
This kind of surprises me, especially since according to the DB 10 g Release 2 XML Developer's Guide (10.2), the W3C standards are in the spotlight since 10gr 2:
http://docs.Oracle.com/CD/B19306_01/AppDev.102/b14259/xdb13gen.htm#i1028612
The XML schema standard specifies that the dates and timestamps in the XML are in standard formats.
Generation of XML in Oracle XML DB functions produce dates XML and timestamps in accordance with this standard.

In earlier versions of Oracle Database 10 g Release 2, the parameters of database date and timestamp formats were used for XML, instead of the standard formats of XML schema.
You can reproduce this behavior by setting the database event 19119, level 0 x 8, as follows:
if anyone can confirm, perhaps even explain above behavior?
-Maybe I'm just deceiving myself, somehow?


Sorry to ask, but I tried to search (a little) for an answer ;)

Best regards
Peter

Peter Gjelstrup wrote:

I just encountered a problem, indicating that XMLELEMENT depends on NLS parameters.

And what else did you expect? Have you read the docs on XMLELEMENT? Value_expr parameter is a string. You pass a number. That's why Oracle implicitly converts to a string. And of course, it uses nls_numeric_characters for this.

SY.

Tags: Database

Similar Questions

  • Regex to allow only integer and decimal numbers.

    Hi all

    I need a regex to allow only integers and decimal numbers.

    Examples:

    100 licences

    100.00 - Unauthorized

    100 - unauthorized

    100.11.22 - unauthorized

    all characters other than numbers - unauthorized

    I used the regular expression - ^ [0-9] +. ? [0-9] * $- but its allowing the "100" also.

    Can someone help me solve this problem.

    Your timely assistance is greatly appreciated.

    Thanks in advance.

    Hello

    inDiscover wrote:

    Hi all

    I need a regex to allow only integers and decimal numbers.

    Examples:

    100 licences

    100.00 - Unauthorized

    100 - unauthorized

    100.11.22 - unauthorized

    all characters other than numbers - unauthorized

    I used the regular expression - ^ [0-9] +. ? [0-9] * $- but its allowing the "100" also.

    Can someone help me solve this problem.

    Your timely assistance is greatly appreciated.

    Thanks in advance.

    Use

    ^[0-9]+(\.[ 0-9] +) ? $

    to make the decimal point and the following figures (of which there must be at least 1), as a unit, as an option.

  • Align decimal numbers for the track list

    Hello, you showed me how do it long ago and have forgotten since. I have a Tracklisting of a paragraph as follows:

    1.

    2.

    3.

    4.

    5.

    6.

    7.

    8.

    9.

    10.

    11.

    I followed the tabs tut in the CC tut who says line right to the top of the box of the tab with the text block, click align decimal numbers and click where you want to go, I get the orange arrow, but nothing aligns. The UTU uses a table for example, is the only way it will work?

    Kind regards.

    If you do just a numbered list, you only need to use tabs to align on the decimal point. Simply insert a fixed space called a figure space.

    Make sure your numbers are of equal width. Since the character or control panel menu > OpenType, make sure Tabular Lining is set for numbers:

    Then in front of 1, 2, etc. Insert a space figure (Type > insert a space > Figure space). White space is the width of any character. You can use several spaces figure if you were with a very large number.

  • Bug of STROKE Weird Illustrator containing decimal numbers

    Hello

    I m having this really weird in Illustrator bug when I try to change the size of the stroke to something with decimal numbers. When I have a call 1 pt or pt 2 it works as expected, but when I change it to something like 1.6 pt, the trait is uneven on the way. Some lines are thicker than others, and it's very weird.

    Can someone point me in the right direction? See my 30 sec video-screen for an overview of the bug.

    Bildschirmfoto 2015-06-12 um 09.02.29.pngBildschirmfoto 2015-06-12 um 09.02.16.pngBildschirmfoto 2015-06-12 um 09.02.03.png

    Thanks for your help in advance!

    sure it is an alignment at pixel grid.

    Select the object and check the transform palette. 'show options' in the menu if the option is not visible.

  • Calculation of tabular form, problem with decimal numbers

    Hello

    I wrote a simple java script function that is responsible for calculating the price * quantity and store that value to total_price.

    function CalcTotalPrice (pThis)
    {
    var vRow = pThis.id.substr (pThis.id.indexOf ('_') + 1);
    html_GetElement ('f07_' + vRow). Value = parseInt (html_GetElement('f06_'+vRow).value, 10) * parseInt (html_GetElement('f05_'+vRow).value, 10);
    }

    The function calculation is correct, but I have problem when the price or quantity decimal numbers.
    For example.
    Currently:
    price * quantity = total_price
    7.5 * 1 = 7 instead of * cf. 7.5 *.

    I've already put a mask of correct format for all of these areas (999G999G999G999G990D00).

    I appreciate your help.

    Request Express 4.2.1.00.08
    Oracle Database 11g Express Edition Release 11.2.0.2.0

    Kind regards

    Hi John,.

    before the multiplication, you analyze your values as an integer, so 'cut' the decimals.
    Replace "parseInt" by "parseFloat" should do the trick.

    function CalcTotalPrice(pThis)
    {
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    html_GetElement('f07_'+vRow).value = parseFloat(html_GetElement('f06_'+vRow).value, 10) * parseFloat(html_GetElement('f05_'+vRow).value, 10);
    }
    

    Please let me know if this worked for you.

    Thank you
    Sandro

  • Grouping and decimal characters in rtf templates.

    Hi guys and girls,

    I'm really struggling with a problem here about decimal characters for the price in my outings.

    I use XML Publisher 5.6.3.

    My goal is to control the character grouping and decimal of my model.

    The numbers in the XML data file can be 10,000.00 or 10,000.00. The format is managed by the users nls_numeric_characters profile option.

    The output of the model will be based on the locale and not the data generated by Oracle reports. For example: reports to U.S. customers must show the number in the format according to 10,000.00. Reports to our European customers must indicate the numbers in this format 10,000.00.

    How can I achieve this in my models? It is possible at all?

    Thank you in advance.

    Kenneth Kristoffersen

    Published by: Kenneth_ on May 19, 2009 01:30

    If you go, stick to the old query and want new changes, I fear its bit difficult and that he must go around to bypass only :)

    use function to translate and replace points like this

    Re: XML-22036 cannot convert XXXXX number

  • I can't install aperture 2, I had an original cd and how numbers do

    I can't install aperture 2, I had an original cd and how numbers do

    What happens when you try?

  • error code after you download security ca roadrunner (application error reads cannot read memory) and some numbers...

    error code after you download security ca roadrunner (application error reads cannot read memory) and some numbers...

    Try a system restore to a Date before the problem began:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • Result of the calculation were separated to the whole and decimal, number not rounding correctly

    I have 2 fields as a result of sharing: the whole and decimal number (1 decimal place). I Math.floor the result to get the whole number and everything is fine until I hit a case where the result is 92,97.

    This should give "93" in the whole of the field and '0' in the decimal field, instead it gives me '92' and '10' (even though I'm only hosting 1 character in the field).

    How can I get the '93' and '0' in the following code?

    fieldLVEDV = this.getField("LVEDV").value;

    fieldBSA = this.getField("BSA").value;

    If (fieldLVEDV! = "" & & fieldBSA! = "") {}

    totalLVEDV = this.getField("LVEDV").value + ((this.getField("LVEDVDec").value)/10);

    calculation = (totalLVEDV / fieldBSA);

    calculationDecimal = calculation;

    partWhole = Math.floor (calculation);

    if(partWhole <0) {partWhole =' ' ;}}

    this.getField("Index").value = partWhole;

    this.getField("IndexDecimal").value = Math.round (10 *(calculationDecimal-partWhole));

    {If (this.getField("IndexDecimal").value = '10')

    {

    this.getField("Index").value = partWhole + 1;

    this.getField("IndexDecimal").value = "0".

    }}

    } else {}

    this.getField("Index").value = "";

    this.getField("IndexDecimal").value = "";

    }

    I thought I'd add the blue part would do the job, but obviously it did not work.

    Ah, your problem is that you do not use the correct comparison operator. To check if two values are equal, the operator is "==" not not "=". Using "=", you assign the value 10 to the field which you then pass in 0 a few lines down. Use 'is' and things should work correctly.

  • Where are my products and serial numbers?

    Ive just replaced my mac, so ive connected to my adobe account, go to my purchase history, found the link to my purchase of adobe creative suite premium. Then I followed the link "downloads and serial numbers" and theres nothing - no download and without serial numbers.

    I have bought the products and have successfully downloaded and installed before.

    Apparently, I can't phone adobe, and I can only use this forum for this kind of question.

    Can anyone help?

    Download and Installation Help-

    https://helpx.Adobe.com/download-install.html

    http://www.Adobe.com/downloads/other-downloads.html

    Find the serial number of your Adobe product quickly

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • My work buy Adobe Acrobat Standard XI a few years ago.  My computer crashed and I need to re - install.  I do not have a disk, order number and serial numbers.  How do I do that?

    My work buy Adobe Acrobat Standard XI a few years ago.  My computer crashed and I need to re - install.  I do not have a disk, order number and serial numbers.  How do I do that?

    Hi, Roxane,.

    You can download Acrobat Standard 11 of: https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html

    and use purchased serial number to activate the software.

    Kind regards
    Rave

  • I CS5.5 Master Collection and you want to transfer to a new laptop.  The CS5.5 was an update for CS3 Design standard and I have all the disks and serial numbers.  I just uninstall both programs a laptop and install them on the other?

    I CS5.5 Master Collection and you want to transfer to a new laptop.  The CS5.5 was an update for CS3 Design standard and I have all the disks and serial numbers.  I just uninstall both programs a laptop and install them on the other?

    You can do it, but you don't have to install cs3 in order to install your upgrade of cs5.5.

    You can launch the installation of cs5.5 and you will be asked your cs5.5 serial number.  Setup will ask you then select the product (in a drop-down list) calling.  Select cs3 and you will be prompted for the serial number for cs3.

    Enter the correct number at the right time and to proceed with the installation.

    If you no longer need these programs on your old laptop, disable (help > deactivate) before uninstalling so that you can keep your two activations.

  • I followed the instructions, electronic download photoshop elements 14.  A click on the button "install".  How can page not found I install?  I have redemption and serial numbers.

    I followed the instructions, electronic download photoshop elements 14.  A click on the button "install".  Page not found.  How can I install?  I have redemption and serial numbers.

    you only need your serial number.

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • have creative suite 5 cd and serial numbers but no cd drive, if I can download the software?

    I have the original CD and serial numbers, but I have a new computer with no CD player.

    Yes, downloadable installation are available in format:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • even and odd numbers with level

    Hi Master,

    I tried to display numbers with level like that...

    Select the level from dual connect by level < = 10;

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    How to display odd and even numbers with level. I tried with mod(level,0) but does not work very well.

    Please notify.

    Concerning

    SA


    Odd:

    Select 2 * level - 1 from dual connect by level<>

    /

    2 * LEVEL 1
    ----------
    1
    3
    5
    7
    9

    Scott@ORCL >

    Still:

    Select 2 * double connection by level<>

    /

    2 * LEVEL
    ----------
    2
    4
    6
    8
    10

    Scott@ORCL >

    SY.

Maybe you are looking for