Friday morning at 8:00am at PASS Summit 15 in Seattle, I will be presenting my Advanced Common Table Expressions and Recursive Query Technique session. Advanced Common Table Expressions Here is the abstract: You might have been introduced to Common Table Expressions (CTEs) and understand the WITH syntax, but want to know more. Learn how recursive queries work with CTEs and how …

Advanced Common Table Expressions and Recursive Query Technique Read more »

The SQL Training was a lot of fun this week we covered Top, Ranking, NTILE, and Analytic functions in preparation for the Microsoft 70-461 exam. Next week Aaron Buma and I will be presenting Set Operators, Derived Tables and CTEs. The live session will be with Google On Air Broadcasts Thursday Feb 12th at 9:00am (pacific). This is a FREE SQL Training …

SQL Query Training – Next Week – Set Operators, Derived Tables and CTEs Read more »

After registering at PASS SUMMIT 13, I had a nice surprise. I walked over to the bookstore to see what interesting new books I could find. I discovered that they had a stack of my book on Common Table Expressions. Seeing my book with the stacks of other SQL Server books was a great feeling. The book has been available …

PASS SUMMIT 2013 Bookstore – A Nice Surprise 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 to Recursive CTEs Recursive CTE for Dates In A Year Expanding on Recursive Dates CTE Multiple CTEs in a Query …

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 Database, if you haven’t set up the sample database, download it and set it up now. To start with having …

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 may have seen with SQL Server before, and there are some parts that are very similar. First lets take a …

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 tree item, you will see a new database called cte_demo that includes 2 tables. dbo.Departments The first table is called …

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 (know as CTE) is a type of in memory result set, similar to a view or 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 that Common Table Expressions deserve. I would rather go into depth so that everyone can master CTEs rather than just breezing …

Common Table Expressions Presentations Updated. Read more »