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 2012 Forums
 Transact-SQL (2012)
 trying to get a percentage

Author  Topic 

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2013-03-11 : 10:22:53
This statement gives my something like 45.0000. I want 45

Max(COALESCE(ROUND(( actualgovvalue + actualctrvalue ) / (govvalue + ctrvalue ) * 100,0), 0)) [Planned %]

Dave
Helixpoint Web Development
http://www.helixpoint.com

Luuk123
Yak Posting Veteran

52 Posts

Posted - 2013-03-11 : 10:38:23
cast as integer ?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-11 : 12:29:16
so if its was 45.3450 or 44.5670 what should be your output?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -