Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: truncate data from 1 million to 1 dollar using formatCurrency/CCur functions?

Re: truncate data from 1 million to 1 dollar using formatCurrency/CCur functions?

From: <jrefactors_at_hotmail.com>
Date: 16 Aug 2005 22:31:14 -0700
Message-ID: <1124256674.385213.118670@g43g2000cwa.googlegroups.com>


The database is Oracle, not SQL Server.

Yes, the data type is NUMBER(11,2), which is good enough to hold 1 million number. I am able to see 1 million number in database. The weird thing is when it displays it in ASP page, then it becomes $1.00.

Aaron Bertrand [SQL Server MVP] wrote:
> Are you sure the data type is numeric? This is likely to happen in the rare
> scenario where the number is stored as varchar (or returned with formatting)
> and it is 1,000,000 instead of 1000000 ... depending on regional and
> language settings, the first comma can be misinterpreted as a decimal (since
> those symbols are swapped in many languages).
>
>
> <jrefactors_at_hotmail.com> wrote in message
> news:1124228936.744197.277150_at_g49g2000cwa.googlegroups.com...
> >I want to ask what are the possiblities to truncate data
> > from 1 million dollars to 1 dollar by using formatCurrency and
> > CCur functions?
> >
> > The ASP page has code <%= formatCurrency(rs(14)) %>, the database
> > rs(14) is 100000000. But when it displays it in the screen,
> > it shows $1.00 with code <%= formatCurrency(rs(14)) %>
> >
> > There is another place with code using CCur and formatCurrency
> > together, i am not sure if this is ok.
> >
> > <%
> > amt_of_deposits = amt_of_deposits + cCur(rRes("natl_trust_tran_amt"))
> > %>
> > <%=formatCurrency(amt_of_deposits)%>
> >
> > This problem is so strange to me, I have no idea whats going on.
> > please advise. thanks!!
> >
Received on Wed Aug 17 2005 - 00:31:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US