The following is chapter 5 from my Common Table Expressions book in its entirety. READER NOTE: Please run the CTEBookSetup.sql script in order to follow along with the examples in this chapter. The script mentioned in this chapter is available at http://SteveStedman.com. Hierarchical CTEs When looking at the table of contents for a book it is generally represented as an outline of some kind utilizing indentation, …

Hierarchical Queries Read more »

We are 2 days away from the Introduction to Database Corruption free presentation. On February 17, 2021 at 6:00pm Pacific time we will be presenting a free webcast training on SQL Server Database Corruption. After repairing dozens of corrupt databases over the last 6 years we are going to share our experiences. Some of the good, the bad, and the …

Introduction to Database Corruption Read more »

The following is chapter 4 from my Common Table Expressions book in its entirety. READER NOTE: Please run the CTEBookSetup.sql script in order to follow along with the examples in this chapter. The script mentioned in this chapter is available at http://SteveStedman.com. Recursive CTEs Have you ever solved a maze puzzle on paper, or had the opportunity to visit a …

Recursive CTEs Read more »

I received this question from someone visiting the blog, and realized that rather than just replying to them, it might be good to put the options out there for everyone to see. Hello, I came across your website and it seems that you are an SQL expert, I’m just getting started. I was wondering can you please give some guidance on …

Guidance on Query Optimization Read more »

At our February webinar presentation on Database Corruption, Stedman Solutions will be giving away 3 daily checkup subscriptions one 3-month subscription, one 6-month subscription and one 9-month subscription.  A value of $300, $600, and $900 each! If you are not familiar with our SQL Daily Checkup product, here is how it works. You need to have Database Health Monitor (free) …

Prize giveaway at the February webinar presentation Read more »