geohernandez - Journey of a Database Engineer and Data Engineer apprentice
  • ABOUT
  • CONTACT ME
  • WORK WITH GEO
    • Data Specialist
    • Speaker Events
    • Resume
ABOUT
CONTACT ME
WORK WITH GEO
    Data Specialist
    Speaker Events
    Resume
geohernandez - Journey of a Database Engineer and Data Engineer apprentice
  • ABOUT
  • CONTACT ME
  • WORK WITH GEO
    • Data Specialist
    • Speaker Events
    • Resume
Chronicles from the trenches•T-SQL

Implementing CTE for filling gaps inside a sequence

November 15, 2018 by geohernandez No Comments

This is the second article of a series dedicated to implementing Recursive Common Table Expression in different kind of scenarios, and this time I will address another use case; it basically consists in filling gaps inside a sequence of an incomplete range of dates.  I would like to comment that the next example has been taken from MSDN forum, I have chosen because I think it is an excellent way to prove how versatile the recursive CTE is, the most creative solution was proposed by Peter Larsson (swePeso) and he brought us  a valid and optimal implementation which is useful since SQL Server 2005 and up versions.

Continue reading
Share:

Search for articles

Recent Posts

  • Python Lambda and Regex – A good team for replacing a string using dictionaries
  • Configuring a Cassandra cluster on Azure – Part III
  • Configuring a Cassandra cluster on Azure – Part II

Categories

  • Azure (3)
  • Azure DevOps (2)
  • Bash script (1)
  • Blog (1)
  • Cassandra (3)
  • Chronicles from the trenches (15)
  • Data Engineering (2)
  • DB optimization (2)
  • Events (2)
  • GIT (1)
  • Python (2)
  • SQL Saturday (1)
  • SSIS (2)
  • T-SQL (4)

Archives

  • December 2020 (1)
  • October 2020 (3)
  • September 2020 (1)
  • August 2020 (1)
  • January 2020 (1)
  • August 2019 (1)
  • July 2019 (1)
  • June 2019 (1)
  • May 2019 (1)
  • April 2019 (1)
  • March 2019 (1)
  • November 2018 (3)
  • October 2018 (1)
  • September 2018 (1)
  • August 2018 (2)

© 2020 copyright Geo Hernandez // All rights reserved
Step by Step