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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -