krishna.mohan 56752
SSC Enthusiast
Points: 103
More actions
March 3, 2014 at 9:37 pm
#290543
I have a decimal value, 10,55,263.55 . This value should be converted into lakhs and the output should show as 10.55. I need to display in lakhs. What is the query do I need to write to get this output.
Thanks in advance
Regards
Sushil Dwivedi
SSC Eights!
Points: 973
March 3, 2014 at 10:32 pm
#1693748
Can we use like that..
if it helps
declare @Lkd int;
Declare @Tho int;
Declare @Hun int;
declare @num decimal;
set @num=1055263.55;
set @Lkd=@num/100000
set @tho=((@num%100000)/100)
SQLCJ
SSCommitted
Points: 1791
March 4, 2014 at 12:41 am
#1693767
Probably something like
DECLARE @T DECIMAL(10,2) = 1055263.55
SELECT ROUND(@T/100000,2)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply