An Idea Exchange for SAS software and services

Comments
by PROC Star
on ‎11-26-2017 01:11 PM

That's a great gotcha.  For those of us SAS types who aren't used to different types of numerics, it's indeed surprising that in MS SQL server, the mean of an int is an int. https://docs.microsoft.com/en-us/sql/t-sql/functions/avg-transact-sql

 

According to a note on stack overflow, the type returned by AVG() is not defined by the ANSI standard, so different databases do different things.  Sigh.

by Community Manager
on ‎12-06-2017 03:55 PM
Status changed to: Under Consideration
 
by Community Manager
on ‎12-06-2017 03:56 PM
Status changed to: Open
 
by Community Manager
on ‎12-06-2017 03:57 PM
Status changed to: Under Consideration
 
Idea Statuses
Top Liked Authors