RE: Selecting range of rows

RE: Selecting range of rows

 

  

> I need to select the first 65,000 rows and place it in excel, then I
> need to select the rest of the records 65,000 to 93,000. How do I
write
> the query? I know I can write to grab "TOP 65,000, but how do I grab
> the rest?

Select *
From myTable
Where primaryKey not in (
Select top 65000 primaryKey
From myTable)

<g>


MS Sql Server LazyDBA home page