For more information on Common Table Expessions and performance, take a look at my book at Amazon.com: Common Table Expressions Joes 2 Pros®: A CTE Tutorial on Performance, Stored Procedures, Recursion, Nesting and the use of Multiple CTEs There are many reasons that a Temp Table, Table Variable or Common Table Expression can be a good solution, but there is …

Temp Table vs Table Variable vs CTE and the use of TEMPDB. Read more »

Thanks to everyone who attended my CTE presentation at SQL Saturday in Olympia Washington today.   Have a great rest of the day.  As promised I have posted the slides and sample TSQL queries here.  If you have any questions, please get in touch with me on Twitter  @SqlEmt  Remember to follow me on Twitter to stay informed of future presentations. Download the Presentation Here: Unleashing …

Unleashing CTEs in SQL Server – Slides and Sample Code – Olympia SQL Saturday Read more »

Thanks to everyone who attended my CTE presentation at SQL Saturday in Portland Oregon today.   Have a great rest of the day.  As promised I have posted the slides and sample TSQL queries here.  If you have any questions, please get in touch with me on Twitter  @SqlEmt  Remember to follow me on Twitter to stay informed of future presentations. …

Unleashing Common Table Expressions in SQL Server – Slides and Sample Code Read more »

Its going to be a great day!   Ready for SQL Saturday 172 in Portland today, looking forward learning lots, and sharing my CTE Presentation with those who want to learn about Common Table Expressions. Please come to my CTE if you are interested in any of the following: 1.What is a Common Table Expression 2.Simple CTE 3.CTE – Subquery …

SQL Saturday #172 in Portland Oregon Read more »

On the next two Saturdays I will be presenting the Unleashing Common Table Expressions presentation at SQL Saturday 172 in Portland Oregon, and SQL Saturday 166 in Olympia Washington. As part of refreshing the presentation I have added a few more examples of how CTE’s can be used in common practice. Using a CTE to parse a Query String. Using …

Unleashing Common Table Expressions 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 CTE, where 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 »

I just found out that two of the sessions that I proposed for SQL Saturday #166 in Olympia next month have been accepted.  These presentations are: Exploring TSQL Enhancements in SQL Server 2012 Unleashing Common Table Expressions in SQL Server These are both presentations that I have given before and have had lots of fun with.   This should be a good …

2 Sessions Accepted for SQL Saturday 166 in Olympia Next Month. Read more »

Here are a few links to some of the other CTE examples used during my Common Table Expressions presentation. Using a CTE in a Function to Split Up a Query String Using a CTE to Split a String Into Rows Can we use CTEs use in SSRS? CTE Hierarchy compared to the alternative Calculating Factorials with a Recursive CTE CTE …

Common Table Expression – links Read more »

What a great day at  Code Camp today. Click here to download the slides and sample code from the presentations. The first presentation that I attended was  Accelerating your Development Workflow presentation by Ian Davis.  What a great presentation, it touched on the lean and agile development processes, it was very well done. The next one was a PowerShell presentation that …

Home after Seattle (Redmond) Code Camp 2012 Read more »