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

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by sweet Captcha

Newsletter Signup

Stay informed of Database Corruption Challenge events, and other things happening at SteveStedman.com with my newsletter.
Newsletter signup form.

Stedman Solutions

StedmanSolutionsRemoteSkilledDBA

Common Table Expressions Book

Paperback:

Kindle: