Skip records in query

Results 1 to 2 of 2

Thread: Skip records in query

  1. #1
    Join Date
    Dec 1969

    Default Skip records in query

    Is it possible to skip records in a query? I thought so but I can&#039;t find the syntax on the web or get it to work.<BR><BR>I thought it was like this:<BR>SELECT TOP 50,0000 * FROM table SKIP n <BR>or..<BR>SELECT TOP 50,0000 SKIP n * FROM table<BR><BR>Any ideas?<BR><BR>I am working with a table with millions of records. I would like to get 50,000 records from several different locations within the table. <BR><BR>For instance:<BR>get records<BR> * 1-50,000<BR> * 100,000-150,000<BR> * 550,000-600,00<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Not very efficient but

    SELECT TOP 50,0000 * FROM table where id not in (Select 100,000 id from table)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts