Here is a short video that shows how to convert those ugly derived table (SubQuery) queries into a common table expression to help clean up your TSQL code. This applies to Common Table Expressions on Microsoft SQL Server, and the …

Using a Common Table Expression Instead of a Derived Table Read more »

  Related Common Table Expression Links Sample Database for Common Table Expressions Writing Your First Common Table Expression with SQL Server Video: Writing Your First CTE with SQL Server Common Table Expressions – Terminating the Previous Statement CTE Scope Introduction …

What is a Common Table Expression – Video Read more »

Day 4 of Common Table Expression Month (June) at SteveStedman.com, today I will cover the topic of terminating the previous T-SQL statement. These queries will be using that database that was set up in a previous posting on the CTE_DEMO Sample …

Common Table Expressions – Terminating the Previous Statement Read more »

Day 2 of Common Table Expression Month (June) at SteveStedman.com, today I will cover creating your very first CTE. Keep in mind that this may look a bit weird or strange at first, the syntax is different from anything you …

Writing Your First Common Table Expression with SQL Server Read more »

As I have presented my Common Table Expressions presentation many times, and as part of writing the Common Table Expressions Book I have created some sample database scripts to use. Once you load up the script into SSMS and refresh the databases …

Sample Database for Common Table Expressions Read more »

This month is going to be Common Table Expressions Month at SteveStedman.com.   My goal is to post one valuable post on a Common Table Expressions topic each day for the entire month. What is a Common Table Expression A …

Common Table Expression (CTE) Month at SteveStedman.com Read more »

I used to be able to do the Common Table Expression in a single 1 hour session, but after writing the book on Common Table Expressions, I discovered that I just can’t fit it into an hour with the detail …

Common Table Expressions Presentations Updated. Read more »