Packing intervals is a classic T-SQL problem that involves packing groups of intersecting intervals into their respective continuous intervals. I set a challenge to myself to try and find an elegant solution that can achieve the task by using only one supporting index and a single scan of the data, and I found one.
from SQL Server Pro http://ift.tt/1kCjeYg
Nenhum comentário:
Postar um comentário
Leave your comment here!