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.
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 resultshrawon |
|
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 layerdeclare @total decimal(10,2),@part decimal (10,2)set @total = 600set @part = 430select (100 /@total) * @partJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
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 MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|