Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 query sum showing including teh decimal part

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2013-01-23 : 12:20:23
select query sum, want to show the decimal part upto 2 digits.

I am using the following all values are coming in round numbers.

SELECT FISCAL_YEAR, company, ACCOUNT,SUB_ACCOUNT,
sum(UNITS_AMOUNT),sum(ACCT_AMOUNT),sum(TRAN_AMOUNT),POSTING_DATE from prod.gltrans
WHERE FISCAL_YEAR = 2012
AND account BETWEEN 8000 AND 8999
GROUP BY FISCAL_YEAR,company, ACCOUNT, SUB_ACCOUNT,POSTING_DATE


Thank a lot for the helpful info.

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2013-01-23 : 12:36:02
I don't see any reason why the numbers would be rounded. Either the unerlying data are ints, or it's a display issue in the front-end.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -