Common Table Expressions (CTE)
Intended Audience
Database programmers and administrators who are familiar with TRANSACT SQL, Subqueries, and advanced join techniques.
Abstract
Have you ever wanted to create a recursive query, but didn’t see how to do it. With the Common Table Expressions class you will learn everything needed to start using CTE’s for recursive queries, as a temporary views, and to use the result set multiple times in the same query. Learn how simplify query syntax using CTE’s. One of the most overlooked features of SQL Server is the CTE which no only simplifies the query, but gives you the ability to do things that would otherwise be impossible (or at least very challenging) with SQL Server. This presentation is targeted for database programmers and administrators who are familiar with TRANSACT SQL, Subqueries, and advanced join techniques.
Class Outline
- Overview – What is a CTE
- Syntax – Using a CTE with a SELECT statement
- Query Recursion with CTE’s
- Multiple CTE’s in a single query
- Creating a Hierarchical List/Outline with Recursive CTE’s
- Self JOINing CTE’s
- Common CTE Use Cases
- CTE’s with SSRS
- Review and Final Demo
Pingback: » Another Session Submitted for SQL Saturday Steve Stedman
Pingback: » 2 Sessions Accepted for SQL Saturday 114 in Vancouver Steve Stedman
Pingback: » Sessions Submitted for SQL Saturday #120 Orange County CA Steve Stedman
Pingback: » CTE Query Performance Steve Stedman
Pingback: » Session Accepted For SQL Saturday 108 in Redmond Steve Stedman
Pingback: » Calculating Factorials with a Recursive CTE Steve Stedman
Pingback: » Sessions for Code Camp in 2 weeks Steve Stedman