After someone reported a small bug in the “two INNER JOINs” diagram, I have created an update to the poster. This is update 4.1, only a minor version upgrade due to only a small change. The thing I love about the SQL Server community is the positive feedback that people give to help improve things. So many times I’ve been …

TSQL JOIN Types Poster (version 21.5) Read more »

So many times I have been asked for help with a query, where the question really comes down to the understanding of the difference between INNER and LEFT or RIGHT JOINs. This will help >>> Try our new JOIN Types Course I created this poster a few years ago and I keep it posted on the wall at the office. …

TSQL JOIN Types Poster (Version 4) Read more »

Day 10 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at how to use multiple CTEs in a query. These queries will be using that database that was set up in a previous posting on the CTE_DEMO Sample Database, if you haven’t set up the sample database, download it and set it up now.   …

Multiple CTEs in a Query Read more »

Download the Thanksgiving query sample code here. I thought it would be fun to put together a query to get us in the spirit of Thanksgiving dinner tonight. This query is using techniques from another recent posting on CSV formatting query output.   Here is my Thanksgiving gift to you, the Thanksgiving day query.   Don’t copy and paste, your browser …

A Fun Thanksgiving Day Query. Read more »

This is a followup to my Whats more important than a backup plan article posted a couple of months ago. When you do a database restore, including log backups, it is very important to get the log chain in the right order, or it won’t work.  To restore a full backup, then log backups, the chain of logs could be …

Restoring A Log Chain Read more »