Formatted Numbers in Database Query

Formatted Numbers in Database Query

Post by Stephan Kle » Fri, 07 Jul 2000 04:00:00



I made a simple database-based table with calculated statistics
(www.frogs-baseball.com/stats.asp). In Acces I show only 3 digits to the
right of the decimal point. What have I to do, so that the table on the web
also shows only (but always) 3 digits (i.e. when having an average of 0.2 I
want it to be displayed as 0.200)?
Your help is appreciated!

Stephan Klee

 
 
 

Formatted Numbers in Database Query

Post by Kathleen Anders » Fri, 07 Jul 2000 04:00:00


On Thu, 6 Jul 2000 13:28:35 +0200, "Stephan Klee"


>I made a simple database-based table with calculated statistics
>(www.frogs-baseball.com/stats.asp). In Acces I show only 3 digits to the
>right of the decimal point. What have I to do, so that the table on the web
>also shows only (but always) 3 digits (i.e. when having an average of 0.2 I
>want it to be displayed as 0.200)?
>Your help is appreciated!

>Stephan Klee


Stephan:
You will first need to change your SQL to select each field from your
data base individually, instead of SELECT *
Then in your SQL, for each field you want to reformat, using Batting
Average as an example,

Format(BAVG,'0.000') as batavg

The formatted field batavg is what will be displayed, out to 3 decimal
places.

HTH,

Kathleen Anderson

URL: http://www.osc.state.ct.us
CMAC Access: http://www.cmac.state.ct.us/access