Day 14 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at data paging with CTE’s and how it compares to the offset and fetch in T-SQL 2012. Now on to CTE Data Paging. 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 …

CTE Data Paging Read more »

Quite often when working testing different performance measures from the Database Health Reports to testing Resource Governor configuration I end up in a situation where I need to emulate a high CPU load on my test SQL Server. In this case it is usually my desktop or a Hyper-V virtual machine, where I want to see how things will work …

Query To Simulate CPU Load Read more »

Day 12 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at how to use multiple nested CTEs in a query to use up all the memory on your SQL Server. 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 …

Nested CTE’s Gone Wild – The Video Read more »

Day 11 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at how to use multiple nested CTEs in a query. 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. Russian …

Nested CTEs Read more »

Day 10 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at how to use multiple CTEs in a query. 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.   …

Multiple CTEs in a Query Read more »

Day 9 of Common Table Expression Month (June) at SteveStedman.com, today I will be building on the intro to recursive CTEs from two days ago and on showing how a recursive CTE can be used to calculate information about dates of the year from yesterday. This would be useful if you were trying to build a calendar. These queries will be using that database …

Expanding on Recursive Dates CTE Read more »

Day 8 of Common Table Expression Month (June) at SteveStedman.com, today I will be building on the intro to recursive CTEs from yesterday and showing how a recursive CTE can be used to calculate information about dates of the year. This would be useful if you were trying to build a calendar. These queries will be using that database that …

Recursive CTE for Dates In A Year Read more »

Day 7 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at the introduction to recursive CTEs. 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. The recursive feature …

Introduction to Recursive CTEs Read more »

A busy day today (my birthday), and I didn’t have time to post a CTE article today, tomorrow I will make up for it with an introduction to recursive CTEs. So far here is where CTE month stands. June 1 – Common Table Expression (CTE) Month at SteveStedman.com (introduction) June 1 – Sample Database for Common Table Expressions June 2 – Writing Your First …

CTE Month So Far Read more »

Day 5 of Common Table Expression Month (June) at SteveStedman.com, today I will cover concepts around the scope of a CTE. The queries in the video 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. Where is …

CTE Scope Read more »