-
Idle hands…can be great learning tools
Read more: Idle hands…can be great learning toolsSo we all know the old phrase about idle hands being the devil’s playthings. They are not wrong. Who hasn’t done some really stupid things when they were bored, as people younger than you are now (and I mean up to and including yesterday. But idle hands can also be your gateway to learning. I…
-
A SQL method for computing rolling totals without window functions
Read more: A SQL method for computing rolling totals without window functionsSay you want to find the most recent 30-day period during which a person purchased some amount of products from your company. How you market to a customer might change if they have been active over a time period recently, or even in the past. But this also means that for each day going back…
-
The slop in this post is all mine
Read more: The slop in this post is all mineI am weirdly tired of the phrase “AI Slop.” Not because AI is so great and does everything wonderful. Not at all. The problem is blaming a tool for the output a person has signed their name to. I prefer “slop created with AI” because the problem is not the AI. Did we ever blame…
-
OK, SELECT * doesn’t belong in EXISTS either
Read more: OK, SELECT * doesn’t belong in EXISTS eitherA few weeks ago, I wrote this post “This post is not only about SELECT *”. It was primarily about the various reasons to avoid using SELECT * in your reusable code, but it was also about being careful when you teach people things to lean a lot harder on principles that are always true.…
-
T-SQL Tuesday #195 – How has your code aged
Read more: T-SQL Tuesday #195 – How has your code agedMany thanks to Pat Wright for this question that makes us all think about the trail of code we have left behind us during our years as programmers/admin/data analysts. Hmm, that may have come off as sarcasm, but considering I hosted last month and asked people to talk about mistakes they have made, I have…
-
Generating a set of sequential numbers, part 2
Read more: Generating a set of sequential numbers, part 2When I wrote the blog from last week (Performance test of generating a set of sequential numbers), I was mostly wanting to see how well I could do this using a recursive CTE. I wondered how terribly they might be. Turns out, they are terrible compared to other methods, but they also aren’t nearly as…
-
This post is not only about SELECT *
Read more: This post is not only about SELECT *I was about to walk out the door to take a flight, when my phone rang. Our major software system we had just released last week was returning weird data. FirstName and LastName was being reversed. I missed my flight because someone wrote SELECT * instead of SELECT FirstName, LastName and a table structure was…
-
Performance test of generating a set of sequential numbers
Read more: Performance test of generating a set of sequential numbersI have read so much lately about how bad it is to use a recursive CTE to do… well pretty much anything. It came up in a discussion about creating sequential number, and not in a positive sort of way. I wrote about recursive CTEs when they were first added to SQL Server, and have…
-
T-SQL Tuesday #194 – Roundup – Learning from Mistakes
Read more: T-SQL Tuesday #194 – Roundup – Learning from MistakesAs I sit here, preparing to write my roundup post, I have not read anyone else’s post yet. I thought it would be good to introduce the idea first, recap to the other posts, then mine. I won’t share any detail of the mistake I shared, but I do want to mention something I included…


