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 |
taj
Starting Member
39 Posts |
Posted - 2013-08-27 : 00:46:18
|
Hi all,I have a column Bill_amount from bill_details table , i want to find 100%,30% of that column.can anyone give me the sample code for this?Thank You |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-08-27 : 01:38:48
|
Percentage calculation:SELECT (Bill_amount *100)/SUM(Bill_amount ) OVER() FROM bill_details--Chandu |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-08-27 : 01:38:57
|
[code]SELECT Bill_amount AS [100%Amount],Bill_amount * 0.30 AS [30%Amount]FROM bill_Details[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|