If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
TWO DEcimal Places
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 -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
#2
|
|||
|
|||
TWO DEcimal Places
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 "Gaetanm via AccessMonster.com" u28527@uwe wrote in message news:690ca30f2e18b@uwe... 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 -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
#3
|
|||
|
|||
TWO DEcimal Places
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 "Gaetanm via AccessMonster.com" wrote: 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 -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
#4
|
|||
|
|||
TWO DEcimal Places
CW wrote: I have the column in the table set at long interger,fix, two decimal places 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. DECIMAL(n, 2), i.e. type = DECIMAL scale = 2, may be more appropriate. Jamie. -- |
#5
|
|||
|
|||
TWO DEcimal Places
onedaywhen wrote:
I have the column in the table set at long interger,fix, two decimal places 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. 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 -- -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
#6
|
|||
|
|||
TWO DEcimal Places
Gaetanm via AccessMonster.com wrote: Wher would that =DECIMAL scale =2 be put in the SQL 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. -- |
#7
|
|||
|
|||
TWO DEcimal Places
onedaywhen wrote:
Wher would that =DECIMAL scale =2 be put in the SQL 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 -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
Thread Tools | |
Display Modes | |
|
|