Skip to Main Content

Database Software

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!

How to extract exact decimal places from tags

beta32cJun 7 2013 — edited Jun 7 2013
I have a request to extract the exact value that is stored in the XML tag.

I have an Element Actual Price with value as 186 in one XML and another XML has the value as 186.00

When I run the below command to read the data i always get answer as 186,
select 
m.actualpart_amt
from PWAYWORKFILE_TABLE,
xmltable(
xmlnamespaces(DEFAULT 'http://www.cccis.com/Pathways/Workfile')
, '$XS/PwayWorkfile' passing WORKFILE as "XS"
columns
  actualpart_amt VARCHAR2(4000) PATH 'ActualPrice'
) m

ACTUALPART_AMT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
----------
186
I would want the values to be exactly what we receive from the XML file. Do we have a function for this.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2013
Added on Jun 7 2013
1 comment
355 views