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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

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

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 trying to get a percentage
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 03/11/2013 :  10:22:53  Show Profile  Reply with Quote
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 - 03/11/2013 :  10:38:23  Show Profile  Reply with Quote
cast as integer ?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 03/11/2013 :  12:29:16  Show Profile  Reply with Quote
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
  Previous Topic Topic Next 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.05 seconds. Powered By: Snitz Forums 2000