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

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -