June 21, 2007 01:21 PM
Identifying Sections
Check out two ways to tackle a tricky problem
Rating:

(0)
SQL Server Magazine
InstantDoc ID #95912
This month, I want to introduce a problem that I like to think of as identifying
sections. The generic form of the problem involves a table (call it T1) that
has two columns of interest: one representing order among rows (call it id)
and the other holding some value (call it val). The task at hand is to identify
sections of consecutive rows that share the same value. The terms section and
consecutive rows are problematic when you're dealing with sets, but as I mentioned,
the co...
...This article is for paid Professional Members only.
Already a Professional Member? Please log in now: