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
 General SQL Server Forums
 New to SQL Server Programming
 to find the division and result

Author  Topic 

shrawon2011
Starting Member

1 Post

Posted - 2013-02-23 : 23:18:22
if student get 430 marks out of 600 marks then how to find percentage,
division and result

shrawon

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-02-24 : 02:42:37
This would give you the answer, but overall ,if this is part of an application, i'd complete at the presentation layer

declare @total decimal(10,2),@part decimal (10,2)
set @total = 600
set @part = 430

select (100 /@total) * @part

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-24 : 23:25:56
marks*100.0/totalmarks should give you percentage

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

Go to Top of Page
   

- Advertisement -