Solved

XPath in XQuery:  Scientific notation

Posted on 2015-01-21
1
286 Views
Last Modified: 2015-01-21
XPath in XQuery:  Scientific notation

I have an output XSD that looks like this:

  <xs:simpleType name="Money">
    <xs:restriction base="xs:decimal">
         <xs:fractionDigits value="2"/>
     </xs:restriction>
  </xs:simpleType>

Open in new window


I then use the following statement:

fn:sum($Accounts/in:IndividualAcct[in:AcctType = 'AttcRec']/in:balance)

Open in new window


One of my summations results in the following in scientific notation:

1.08531525E6

Open in new window


I need to format this in such a way as to NOT use
scientific notation.  

Can I use either fn:string or format-string().  

How can I do this?   Can I do this all on the same line as the fn:sum() statement.  What would that look like?

Thanks
0
Comment
Question by:Anthony Lucia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 40563179
you need format-number() to get rid of the scientific notation

format-number(fn:sum($Accounts/in:IndividualAcct[in:AcctType = 'AttcRec']/in:balance * in:amount), '0.00')
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question