I have a database which has me a value, a sharesize in bytes and a sharename. Which is pretty accurate but not useful for my enduser. Therefore I transformed the value to GB. Which worked great by using a simple divide.
lets assume my DB consists of two columns. Sharename and Sharesize.
Sharename | Sharesize
Share 1 |71685107549 Now I run this: SELECT TOP (1000) [Sharename] ,[ShareSize] ,(ShareSize / 1e+9) SharesizeGB FROM [mydb].[dbo].[myshares]
The output is:
ShareSize SharesizeGB 71685107549 71,685107549
Now I need to replace the "," with a "dot" and round the result to just have two digits after the dot.
Is that possible using only a select statement ?
For my example its not needed to divide by 1024.