Link to home
Start Free TrialLog in
Avatar of BBlu
BBluFlag for United States of America

asked on

Converting number to 2-digit in MS Query


I am working on an MS Query and have the following code:

SELECT TempTable.Category, Sum(TempTable.`Dec 31, 09`), Sum(TempTable.`Dec 31, 10`), Sum(TempTable.`Jul 31, 11`)
FROM TempTable TempTable
WHERE (TempTable.Category<>'')
GROUP BY TempTable.Category

It produces what I expected and hoped for except for the extra long numbers.  Can someone tell me how to convert the number to 2 decimal places with commas as thousands separators?
ASKER CERTIFIED SOLUTION
Avatar of Jerry Miller
Jerry Miller
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BBlu

ASKER

Thank you both, when I tried the Round() function, it seemed to work (code attached).  But when I try to do the currency version, which I need I guess if I want to include commas for thousands separators, I get an error.  Any idea why?

 User generated image
Avatar of BBlu

ASKER

Never mind..it looks like II need to make 'currency' single quotes.. that worked.
Avatar of BBlu

ASKER

Thank you both very much!