Recursive CTE to Calculate Dates for the Last 30 Days
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… Read More »Recursive CTE to Calculate Dates for the Last 30 Days
Notes from SQL Server Classes
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… Read More »Recursive CTE to Calculate Dates for the Last 30 Days
Just this week the team at Stedman Solutions finished the SQL Server JOIN Types paid training course. I am very excited to complete this and… Read More »Excited to Release Training Videos
After the last post on Cumulative Distribution Function (CDF) or as it is known in TSQL CUME_DIST(), I realized that although I showed how to… Read More »Cumulative Distribution Function (CDF) – Analyzing the Roll of Dice with TSQL
I came across this example when preparing my CTE presentation a while back. Which produces the following output. Download my book for FREE when you… Read More »Using a CTE in a Function to Split Up a Database Connect String
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… Read More »Using a CTE in a Function to Split Up a Query String
After my CTE presentation a while back I was asked many questions, and received several great suggestions from people. One question was how does… Read More »CTE Hierarchy compared to the alternative
Years ago while working on my CTE presentation for a SQL Saturday I added a blog post called “Using a CTE to Split a String… Read More »Using a CTE to Split a String Into Rows with Line Numbers
The article could be named, “How to use up all of your SQL Server available memory with a single CTE query.” Another name for the… Read More »SQL Server Memory Hog Query
The following question came up when working on my CTE presentation for SQL Saturday. Does a query that JOINs a CTE to itself execute the… Read More »CTE Query Performance
Common Table Expressions are a great way to simplify complex derived table queries. If it makes sense to break out one derived table or subquery… Read More »Multiple CTE’s in a single Query