SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 query sum showing including teh decimal part
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cplusplus
Aged Yak Warrior

534 Posts

Posted - 01/23/2013 :  12:20:23  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
2869 Posts

Posted - 01/23/2013 :  12:36:02  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000