Interval Queries in SQL Server Part 5
This is the fifth part of the solutions for interval queries in SQL Server. However, it is empty for nowL For an introduction, please refer to the blog post Interval Queries in SQL Server Part 1 (http://blogs.solidq.com/dsarka/Post.aspx?ID=149&title=Interval+Queries+in+SQL+Server+Part+1). You can find the second part of the solutions in the blog post Interval Queries in SQL Server Part 2 (http://blogs.solidq.com/dsarka/Post.aspx?ID=150&title=Interval+Queries+in+SQL+Server+Part+2), the third part in the blog post Interval Queries in SQL Server Part 3 (http://blogs.solidq.com/dsarka/Post.aspx?ID=151&title=Interval+Queries+in+SQL+Server+Part+3), and the fourth part in the blog post Interval Queries in SQL Server Part 4 (http://blogs.solidq.com/dsarka/Post.aspx?ID=152&title=Interval+Queries+in+SQL+Server+Part+4). Note that you also need to read an excellent article by Itzik Ben-Gan wrote on interval queries in SQL Server (http://sqlmag.com/t-sql/sql-server-interval-queries) by using the Relational Interval Tree model. I am using the tables and data Itzik has prepared. In order to test the solutions, you can download the code from Itzik's article by using the link in this paragraph.
My friend Itzik found very quickly an error in this code. However, this is not my fault. I blame the beer. Yesterday I was sitting for a long time with Matija Lah. All of the time I was complaining that I have a bad feeling about this solution - it seemed too simple. And instead of going home and trying to check and fix it, I just ordered another beer and kept complainingJ Anyway, with Itzik, now we are taking vacations and going to Ireland for a hike, and we are going to try to make this solution working. I will leave this post for now, as a warning to those who read the erroneous one. In the future, there are two possible outcomes:
If this post disappears, it means that we did not find a solution, and that I am trying to pretend it was never publishedJ
Dejan Sarka's Blog
