Over 250 pages of Common Table Expression lessons! Download your FREE copy today! The Common Table Expression (CTE) is one of the more powerful and often overlooked features in Microsoft SQL Server. This book will show some of the more interesting things you can do with a CTE. You will learn how CTEs are a great alternative to derived table …

Improve you query skills Steve’s CTE book! Read more »

In this short but to the point video Steve explains the question “what is a CTE?” Transcription of this video: CTE is kind of this concept of what we’re calling a virtual table where it’s like a sub query or like a view where it’s referencing another chunk of SQL query that’s going to be used and named. Similar to …

What is a CTE? – Video Explanation Read more »

Common table expressions are beneficial to use when writing or managing complex queries. Being condensed or simplified, CTEs increase accessibility and digestion. Watch Steve’s video for more on CTEs…… Transcription of this video: Why would you use common table expressions? I mean, you may have been writing SQL queries for 10 or more years, and have never used a common …

Why Use Common Table Expressions Read more »

Hooray! It’s CTE month. Some of you may be happy but you others may by like ugh. Common table expressions can be tough and confusing but WE’VE GOT YOU COVERED! This month we will be throwing lots of valuable CTE information and resources at you including….. Instructional videos Tips of the trade And a FREE download! Check in daily to …

It’s CTE Month at Stedman Solutions Read more »

Ok cool Stedman Solutions is having CTE (common table expressions) month in June. What does that mean for you my reader? Well let me share all the goodies I have to offer this month! Next month I will be releasing……. Over 15 CTE videos with topics ranging from a memory table to recursive CTE’s Common table expressions hot tips A …

What Does CTE Month Mean for You? Read more »

Current Stedman Solutions SQL Course Coupon Codes. Save Up to 65% Off our Popular Online SQL Server Courses, a Once a Year Type Savings! 65% Off for April JOINs Month Coupon Code: APRIL-JOINS Leave your JOIN confusion in the past and enroll in our SQL Server JOIN Types Course. Learn More Here 50% Off Our Newest Course! Coupon Code: FEB-RELEASE50 …

SQL Course Coupon Codes Read more »

Russian Nesting Dolls If you have ever seen the Matryoshka dolls known as the Russian nesting dolls or babushka dolls they are very interesting. They start with a large wooden doll that when opened contains a slightly smaller doll, then inside of that one an even smaller doll. These dolls often have five to eight dolls nested inside of each …

Nested CTEs Read more »

Have you ever needed to generate a list of dates for the last 30 days.  There are lots of different ways to do this with TSQL, but one way is with a recursive CTE. You can then left join against it with another query to generate a list of all  dates in a result set, along with the dates for …

Recursive CTE to Calculate Dates for the Last 30 Days Read more »

The question came up as to how do I parse a query string using TSQL.  So here you go, using a common table expression, and basing this on a similar function to what I put together yesterday for split. which produces this output. A quick and easy way to parse a query string  in TSQL using a CTE. Receive a …

Using a CTE in a Function to Split Up a Query String Read more »