sql - how to place a decimal point just before last two digit of a number -
i have query below
select sum(total) sales
it give result 123456789
because in end data stored out decimal point. need format 1234567.89
i tried
select convert(decimal(10,2),sum(total)) sales
but give output 123456789.00
how make 1234567.89
divide 100.0:
select convert(decimal(10,2), sum(total) / 100.0) sales
Comments
Post a Comment