Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXTRA INTEGERS IN MY QUERY RESULT

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
0
0
US
Hi, I am querying from an SQL database. I am querying prices for items. How come the results have 3 extra zeros at the end ??..

Eample. 125.22000
184.17000

I looked at the database and it only has 125.22 and 184.17

How do I cut the extra zero's ??
thanks

 
It may have something to do with the prescision of the column you can set this in enterpise manager I think. Rember you can user numberFormat to format the number when displaying.

HTH

Kola
 
Hi, ok .. i figured out that the precision column is set to 5 thats why its adding the extra zeros to make it 5 decimals.

But I cant edit the precision since it will screw up other stuff.

Now, is there anyway in coldfusion where in I can cut out the extra zeros and just set the decimal to 2 integers ?

thanks

 
try this :
#replace(numberformat(yourVariable,"999,999,999,999.00"),",","'","all")#
 
See my reply to your other post of this question.

By the way, these things are not extra "integers" as you have referred to them. The correct term is "digits". An interger is a whole number. It contain any number of digits. A real number is a number that has both a whole number part and a "fractional" part. It may contain any number of digits, but the digits are not integers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top