Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract decimal value from XML file

776189Sep 22 2010 — edited Sep 22 2010
Hi,
I am extracting the value from XML file and stored it in to variable. the XML node field is LAST_PAYMENT_AMOUNT which contain the value 1752.8 (decimal value). But problem is this not extracting as it give value error, as i oberve it does not take decimal value because whenver i gave number value i.e 1752 its work but fail for decimal value.

so please let me know how to extract decimal value.



begin

v_amount :=to_number(V_CR_XML.extract('ns0:Customer/Receipts/LAST_PAYMENT_AMOUNT/text()',ER_NAMESPACE).getnumberval());
EXCEPTION
when others then

v_amount :=111;
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2010
Added on Sep 22 2010
11 comments
3,209 views