sql server - Sum Function with division -


i trying figure out correct format when using sum function division:

which 1 correct?

sum(filesize/1024) 

or

sum(filesize)/1024 

the filesize column measurement in kilobytes converting megabytes.

they mean different things. sum(filesize/1024) reduces file size megabytes, , sums megabytes. each file, "forgets" size in excess of megabytes boundary, underreport total file size.

sum(filesize)/1024 report correct size in megabytes-- rounded down.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -