There are a lot of ways to do this. Here's one way. You'll obviously need to adjust the specifics for your view.set nocount ondeclare @s varchar(8000) ,@id intset rowcount 10select @id = 0while @@rowcount > 0begin --display current 10 values print @s --reset select @s = null --Get next set select @s = coalesce(@s + ', ' + convert(varchar, id), convert(varchar, id)) ,@id = id from sysobjects where id > @id order by id end--don't forget to do this!set rowcount 0-----------------------------------------------------------------------output:1, 2, 3, 4, 6, 8, 9, 10, 11, 1214, 19, 20, 21, 22, 23, 24, 95, 96, 226815870242815927, 278292051, 326292222, 370816383, 402816497, 418816554, 470292735, 518292906, 539864990, 555865047571865104, 587865161, 603865218, 619865275, 635865332, 820913996, 836914053, 852914110, 868914167, 900914281916914338, 932914395, 948914452, 964914509, 1030294730, 1046294787, 1062294844, 1078294901, 1094294958, 11102950151126295072, 1142295129, 1158295186, 1174295243, 1190295300, 1206295357, 1222295414, 1238295471, 1254295528, 12702955851275151588, 1286295642, 1291151645, 1302295699, 1307867726, 1318295756, 1332915820, 1334295813, 1339151816, 13489158771350295870, 1355151873, 1364915934, 1366295927, 1371151930, 1380915991, 1382295984, 1387151987, 1396916048, 13982960411412916105, 1414296098, 1428916162, 1430296155, 1444916219, 1446296212, 1460916276, 1462296269, 1476916333, 14782963261492916390, 1494296383, 1510296440, 1526296497, 1528392514, 1542296554, 1544392571, 1556200594, 1566628624, 15722006511604916789, 1620916846, 1672393027, 1686297067, 1717581157, 1718297181, 1734297238, 1750297295, 1766297352, 17822974091798297466, 1814297523, 1830297580, 1846297637, 1862297694, 1945057965, 1961058022, 1977058079, 1993058136, 20090581932025058250, 2041058307, 2056394395, 2073058421, 2089058478
EDIT:if you use the "while @@rowcount > 0" condition, you need to be carefull about what the last statement is before the "END". Notice I put the display and reset statements before the SELECT so that @@rowcount was checking the important statement.Be One with the OptimizerTG