[AccessD] Query results display problem

Gustav Brock gustav at cactus.dk
Thu Apr 29 09:15:29 CDT 2004


Hi Chester

Have you tried:

  Avg(CDbl([SumOfTOTOILPROD])/1000) AS OIL

/gustav


> I have a query that returns a 7 day average of some numbers and the 7
> day average divided by 1000. The regular 7 day average display fine but
> the 7 day average divided by 7 displays no decimal places. For example 7
> day average is 1027.28571429 but the seven day average divided by seven
> displays 1. I tried setting properties to fixed and 2 decimal places and
> got 1.00. Why does it display this way? Thanks. SQL if someone wants to
> look at it.

> SELECT Avg([qry Sandhills Oil].SumOfTOTOILPROD) AS AvgOfSumOfTOTOILPROD,
> Avg(([SumOfTOTOILPROD])/1000) AS OIL
> FROM [qry Sandhills Gas] INNER JOIN [qry Sandhills Oil] ON [qry
> Sandhills Gas].ACTVDATE = [qry Sandhills Oil].ACTVDATE
> WHERE ((([qry Sandhills Gas].ACTVDATE) Between Date()-8 And Date()-2));




More information about the AccessD mailing list