TWO DEcimal Places

  • Thread starter Gaetanm via AccessMonster.com
  • Start date
G

Gaetanm via AccessMonster.com

I have a Query that totals work minutes and devides it by 60
to get the hours. It does not give me the two decimal places.
I have tried Round but it did not work. But please take into concideration
that I'm a newbie.

I have the column in the table set at long interger,fix, two decimal places

Here is the code I do Have :

SELECT time_total.EmployeeID, Sum(time_total.TotalHoursMinutes)\60 AS
SumOfTotalHoursMinutes
FROM time_total
GROUP BY time_total.EmployeeID;
Could you please help

Gaetanm
 
J

Jeff Boyce

You have "the column ... set at LONG INTEGER..."

Integers have no decimal places, no matter how many you tell them to have.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

CW

By definition, an integer is a whole number. So whatever number of decimal
places you may have specified,they will not show up.
Try using Double instead of Integer.
CW
 
G

Gaetanm via AccessMonster.com

onedaywhen said:
DECIMAL(n, 2), i.e. type = DECIMAL scale = 2, may be more appropriate.

Jamie.

I have changed to double, fixe and 2 decimal places to no avail. Wher would
that =DECIMAL scale =2 be put in the SQL

Gaetanm
 
G

Gaetanm via AccessMonster.com

onedaywhen said:
In the UI: Table, Design View, Field Size: change 'Long Integer' to
'Decimal', (UI redraws itself - yuk!), Scale: change from 0 to 2 (or
possibly 3 to allow for custom rounding).

Jamie.

--
Thank you you have been a great help


Gaetanm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top