A. Look up the SET ANSI_WARNINGS ON/OFF command/option in the Books Online. To meet ANSI standards the default for this is on.

When it is on any numeric summarisation function with a NULL will get an error. Also trying to fit 23 characters in a 20 byte field will get the error.

Either fix the code concerned (the best option) or turn the warnings off.