From: Snedker on
How do I get: SELECT ((127/153)*100) AS percentage
to return 83 (or so)?

Regards /Morten
From: nj on
select cast((127*1.0/153*1.0) * 100 as int) as percentage
From: Eric Isaacs on
DECLARE @Value DECIMAL(10,2)
SET @Value = CONVERT(DECIMAL(10,2), 127) / CONVERT(DECIMAL(10,2), 153)
* 100
SELECT @Value

OR

SELECT (127 * 100)/(153)

-Eric Isaacs
From: Michael Coles on
Add a .0 to the 127.

SELECT ((127.0/153)*100)

--
Thanks

Michael Coles
SQL Server MVP
Author, "Expert SQL Server 2008 Encryption"
(http://www.apress.com/book/view/1430224649)
----------------

"Snedker" <morten.snedker(a)gmail.com> wrote in message
news:96aa67a5-823f-4b8f-9697-a3b04c1f3908(a)q15g2000yqj.googlegroups.com...
> How do I get: SELECT ((127/153)*100) AS percentage
> to return 83 (or so)?
>
> Regards /Morten