Weekly SQL Training – MERGE Statement and Recursive Queries

The free SQL Server Queries weekly training is being presented by Emergency Reporting. The training is being presented by Aaron Buma and myself. This week we are covering two topics, first the MERGE statement will be covered by Aaron, then I will present on Recursive Queries. There MERGE statement is one of those that I was not familiar enough with when I took the certification exam 2 years ago. The recursive queries section was touched on a bit during the CTE presentation, here I will go into much more detail with additional samples.

You can download the slides and TSQL sample code here:

Here are the slides, located at slideshare:

And here is the video on my YouTube Channel:


This is a live broadcast that was available on Google On Air Broadcasts.

See Also:

Using a Common Table Expression Instead of a Derived Table

Here is a short video that shows how to convert those ugly derived table (SubQuery) queries into a common table expression to help clean up your TSQL code. This applies to Common Table Expressions on Microsoft SQL Server, and the recording comes from my Free SQL Query Training course.



Other CTE Related Posts:

What is a Common Table Expression

I just a added a video to YouTube titled “What is a Common Table Expression”.  This video covers the extreme basics of what a CTE is on Microsoft SQL Server, and how to write that CTE in TSQL. Here is the video:

It’s a very short video with the basics of what a CTE is.  Take a look.


Other CTE Related Posts:

Set Operators, Derived Tables and CTEs – Presentation downloads

Here is the agenda for this weeks free SQL training covering  Set Operators, Derived Tables and CTEs – Presentation to prepare for the 70-461 exam:

  • —Set Operators
  • —Derived Tables
  • —Common Table Expressions

This session is presented by Aaron Buma and myself.

Here is a quick overview of the slides:

This is the entire session recorded on YouTube:

Here are the TSQL files and the presentation if you would like to download it.

Set Operators – Derived Tables and CTEs.zip


Please join us on the live broadcast at Google On Air Broadcasts


TOP, Ranking, NTILE, and Aggregate Functions


Continuing our weekly SQL Query Training for the 70-461 exam preparation, at Emergency Reporting, we are sharing this weeks class with the world. Free SQL Query training.




Here is the video of the training on TOP, Ranking, NTILE, and Aggregate Functions today. The first half was presented by Aaron Buma, and the second half I presented.

The following topics were covered in this session.

  • —TOP(N)
  • —NTILE
  • —OVER clause enhancements
  • —CUME_DIST – Cumulative Distribution

Here is the zip file to download with slides and TSQL code.


See Also

SQL Server FILESTREAM and FileTables

Monday: Using FILESTREAM and FILETABLES in SQL Server

Configuring and Using FILESTREAM and FILETABLES in SQL Server.  Developers love to use SQL Server to store files, but this causes headaches for the DBA, finally a reasonable solution for file storage in SQL Server FILETABLES and FILESTREAM. SQL Server 2008 and 2012 add the new features of FILESTREAM and FILETABLES. Learn how to configure and manipulate files in your SQL Server with FILESTREAM, then learn how to do everything that FILESTREAM sounds like it should do with FILETABLES. With FILETABLES inserting is as easy as drag and drop.

Here is the outline for the presentation:

  • FILESTREAM – SQL Server 2008 and newer
    • Introduction and Configuration
    • Creating a Table Using FILESTREAM
  • FileTables – SQL Server 2012 and newer
    • Configuring and Creating FileTables
    • Insert, Update and Delete with a FileTable
    • Drag and drop with the file system


Here are the slides from the presentation and the supporting sample files.

Filestream and FileTables.zip