Goce Smilevski


An Efficient Set-based Solution for Islands and Gaps

After reading a recent article on identifying islands and gaps in sequential numbers, one of our readers was inspired to develop a more efficient solution for fragmented data. New Author Goce Smilevski brings us his solution and supporting data to show how this can be done better.

2.33 (3)

2021-04-16 (first published: )

9,900 reads

Generating sequential numbers - the fast way

It is often necessary to generate a table with sequential numbers, up to a specified upper limit N. For small N, a simple INSERT in a WHILE loop will do. But, for large N, that solution becomes too slow. This script presents a different approach. It generates sequential numbers from the binary representation of N, […]

4.5 (2)

2004-12-30 (first published: )

596 reads

Blogs

Daily Coping 5 Aug 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Interview Tip: Know your resume

By

Seriously. Make a point of reading your resume before submitting it, and again before...

SQL Server on Kubernetes Book Published!

By

I’m super proud to announce that Ben E. Weissman and I have published SQL...

Read the latest Blogs

Forums

Update table from other tables

By jamesstirling01

Hi, Basically i have 2 tables check-in and check-out where users check-in and check-out...

private messages gone

By frederico_fonseca

hi, Maybe I'm doing something wrong now, but it seems that the option to...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers