For this month’s T-SQL Tuesday, I invited y’all to tell me how you know a query’s gonna be bad when you open it.
Riccardo Perico and Shane O’Neill says WHILE loops and/or CURSORs are pretty good indicators. I agree, because especially when you’re opening code in the year 2026, and someone still hasn’t figured this out (or the code hasn’t been changed in decades), then you’re gonna be in for a rocky road. Side note: this is one of the times where I really love AI, because it’s great at making very quick work of the horrible task of turning RBAR

