CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Limiting decimal places in agregate function

Print topic Send  topic

Author Message
Joe Archer
Posted: 03/26/2003, 10:22 AM

can anyone help please?
I'm performing the standard deviation agregate function (SELECT STDEVP(fieldname) ) on a column in an access database, it works fine, but it displays about 10 decimal places, I need to limit it to 2 or 3, can I do this using the SQL statement?, or do I have to alter the maximum field size in the database itself? (baring in mind that the function displays the results of a calculation and not an actual field value)
any help appreciated,
Joe.
DaveRexel
Posted: 03/26/2003, 12:51 PM

Hey Joe

did a quick read through the MS JET reference and did not find any DB functions that would help you so you could use your script-language math commands on the returned value to reduce the extraeneous decimals. I could be wrong as my w2k site is not up for testing yet.

Greetings
Dave

CCS Knowledge Base
www.rexdesign.com
Joe Archer
Posted: 03/26/2003, 1:15 PM

Your efforts are appreciated Dave,
My ASP skills are limited, any idea how I might go about reducing the displayed value using ASP VB?
DaveRexel
Posted: 03/26/2003, 1:46 PM

::

<% =Round(2.127, 2) %> returns 2.13

Syntax
Round(x,d) Round x to d decimals

should work

Greetings
Dave

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.