Help with Decimal Roundings
-
hi Guys , i am a bit stuck here i have this value "0.833333333333333" and i want the asnwer to be 83 , i tried this
SELECT ROUND(0.833333333333333,2)
but it does not work
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa[at]dotnetfunda.com http://www.Dotnetfunda.com
-
hi Guys , i am a bit stuck here i have this value "0.833333333333333" and i want the asnwer to be 83 , i tried this
SELECT ROUND(0.833333333333333,2)
but it does not work
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa[at]dotnetfunda.com http://www.Dotnetfunda.com
-
Thanks
DECLARE @Value FLOAT = 0.833333333333333;
SELECT CAST(@Value * 100 AS INT);Worked for me
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa[at]dotnetfunda.com http://www.Dotnetfunda.com
-
hi Guys , i am a bit stuck here i have this value "0.833333333333333" and i want the asnwer to be 83 , i tried this
SELECT ROUND(0.833333333333333,2)
but it does not work
Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa[at]dotnetfunda.com http://www.Dotnetfunda.com