converting factored number to decimal in MS SQL
Posted
by LS
on Stack Overflow
See other posts from Stack Overflow
or by LS
Published on 2010-03-22T15:53:26Z
Indexed on
2010/03/22
16:01 UTC
Read the original article
Hit count: 244
sql-server
I need to convert a number which gives decimals in factored format in to decimals,
i.e. 11.16 is 11.5 in decimal. This is because 16 is in base of 32 and 11.16 should be read as 11+16/32 = 11.5
I get 11.16 as a string and I need to change it to 11.5 as numeric in MS SQL(2005) database.
Any shorter way of doing this rather than splitting strings,converting to numerics,maths,convert to string, concatenate and then convert to numeric?
© Stack Overflow or respective owner