A CTE is a name, not a saved result. Build both versions on 20,000 rows, compare the plans, and see why the answer is never always one or the other.
Unit of Measure Conversions: One Table for Kilograms, Pounds and Boxes
Adding kilograms, pounds and boxes gives a number that means nothing. Convert each product to one base unit and find the rows that cannot convert.
Find Damaged Pages in SQL Server With suspect_pages
Find damaged pages in SQL Server by reading msdb.dbo.suspect_pages. Decode the event type, find the table behind each page and know what to do next.
Finding Old Agent Jobs Not Run in Months or Never Scheduled
Review agent jobs not run recently or lacking schedules, combine history and activity, and disable approved candidates for review.
Fastest Way to Retrieve Rowcount for a Table – SQL in Sixty Seconds #096
What is the fastest way to retrieve rowcount for a table? Whenever I am helping my clients with their SQL Server, I get this question.
Survey Answers: A Table Design for Questions and Responses
Store survey answers as typed rows instead of one column per question. Then break the design on purpose to see what it blocks and what it cannot.
Counting Ranked-Choice Votes With a Loop and a Table
Four people rank three topics and nobody has a majority. Here is a small loop that eliminates the weakest topic, moves its ballots and logs every round.







