A monthly list of puzzles and solutions on SQLAuthority.com, from a NULL puzzle that breaks SUM to finding the maximum between two numbers.
SQL SERVER – Puzzle Involving NULL – Resolve – Error – Operand data type void type is invalid for sum operator
SELECT SUM over a lone NULL throws Msg 8117: Operand data type void type is invalid for sum operator. Here is why it happens and how ISNULL fixes it.
SQL SERVER – BI Quiz Hint – Performance Tuning Cubes – Hints
Hints for my SQL BI Quiz on performance tuning cubes: what would you check first when a cube that was fast suddenly returns data very slowly?
SQL SERVER – Solution – Generating Zero Without using Any Numbers in T-SQL
Madhivanan asked how to get zero without using any numbers in T-SQL. Here are the clever reader answers, from SELECT $ to counting a NULL cast.
SQL SERVER – Solution – Puzzle – Statistics are not Updated but are Created Once
The solution to my puzzle on why statistics are not updated but are created once after a large insert, even with auto update on, and the fix that worked for me.
SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*)
The solution to my puzzle on why SELECT * throws an error but SELECT COUNT(*) does not, with the best reader answers and credit to Rob Farley.
SQLAuthority News – BI Quiz Question – How to Optimize Cube? – Hints
Hints for my SQL BI Quiz question on how to optimize cube performance: find the root cause of the slowdown and check if hardware is to blame.






