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.
| Author |
Topic |
|
BigRetina
Posting Yak Master
144 Posts |
Posted - 2003-04-07 : 06:56:44
|
| Salute..How can I write a select statement to find the gap in a serialized column such as :InvoiceNo---------12359I want to return the following:Gaps:------4678Thanks In Advance |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-04-07 : 07:11:14
|
select n.nfrom dbatoolbox.dbo.numbers nwhere not exists ( select 1 from BigRetina where n.n <> InvoiceNo ) dbatoolbox.dbo.numbers is a tally table with ints from 1 to whatever.Jay White{0} |
 |
|
|
Peter Dutch
Posting Yak Master
127 Posts |
Posted - 2003-04-07 : 07:13:39
|
| http://www.nigelrivett.com/EDITsorry, forgot to refresh.../EDITEdited by - Peter Dutch on 04/07/2003 07:15:18 |
 |
|
|
|
|
|