Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 returning free numbers

Author  Topic 

ArielR
Starting Member

21 Posts

Posted - 2007-08-02 : 10:38:32
I need to make a procedure that return free numbers from a secuential table. Could somebody help me?.

for ex: 1, 2, 3, 4, 5, 7, 8, 9, 10

Its mast be return 6. Thank

pootle_flump

1064 Posts

Posted - 2007-08-02 : 10:42:07
What's a secuential table? Are these numbers in rows or columns? The former - sounds like you have a first normal form problem. The latter is easy.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-02 : 10:56:42
http://www.nigelrivett.net/SQLTsql/FindGapsInSequence.html

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-02 : 11:00:03
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=17768



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -