Andy Warhol style pop art of my departed dog Callie, who we called C.

Clear, Concise, Complete, and Correct: Avoiding AI Slop

September 28, 2026 Andy 0

There’s a particular kind of writing that has become increasingly easy to produce: technically plausible, grammatically correct, reasonably well organized, and almost completely exhausting to read. You know the stuff–it has a lot of words. It has headings for everything. It explains things that don’t … [Read More]

Consuming SQL Agent dates & durations

March 7, 2025 Andy 0

SQL Agent’s schema is older than me. It handles dates, times, and durations like it’s 1980 by using integers instead of date/time data types. My buddy Aaron Bertrand talks more about Dating Responsibly so that you can have a good datetime with your own database. … [Read More]

Not all stats should be auto-updated

August 29, 2024 Andy 1

Statistics auto-updates are generally a good thing–auto-update of statistics is the default behavior in SQL Server. Having the freshest information about the data “shape” helps to inform the best selection of an execution plan for queries. Except for when it doesn’t. Because It Depends™️ Let’s … [Read More]

T-SQL Tuesday: The last ticket I closed

February 13, 2024 Andy 4

For this month’s T-SQL Tuesday, Brent Ozar (blog|Instagram) asks us to describe the most recent ticket we closed. “We had a pretty significant wait spike…” The literal last ticket I closed was “please run this script in production…”, and I don’t think it would be … [Read More]

SQL Modulo Function gives the wrong value?

November 18, 2022 Andy 0

Question In Javascript, Excel, Python, and a scientific calculator, the modulo operation gives a value of 113.84230371659942. (Or something very close to that, depending on number of decimal places and rounding.) But in T-SQL, returns a value of -246.1576962834. I’ve tried using As I was … [Read More]