Question : SQL Server find sequnce of same values

I need to search a large table ( > 1M rows) for sequences of the same value or near values. For instance, I want to find sequences of a given number of times that a specific value appears in contiguous rows. The rows can be ordered by an identity field.  I might want to find all times when a 0 appears in a field 20 times in a row, for instance.

thanks

Answer : SQL Server find sequnce of same values

Random Solutions  
 
programming4us programming4us