Re: paging

From: Anders Altberg (x_pragma_at_telia.com)
Date: 08/23/04

  • Next message: jorge: "Re: paging"
    Date: Mon, 23 Aug 2004 21:17:41 +0200
    
    

    That would TOP 1020, check the last row and go from there.
    There is a selfjoin that lets you number the rows exactly
     SELECT A.col ;
    FROM Table AS A JOIN Table AS B;
    ON A.col=>b.col ;
    GROUP BY A.col ;
    HAVING COUNT(B.col) BETWEEN 1020 and 1040 ;
    ORDER BY A.col

    but it's too slow to recommend even with just a few thousand rows in the
    table.
    -Anders

    "Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@strconv.14> wrote in message
    news:#WxkJ7SiEHA.2668@TK2MSFTNGP10.phx.gbl...
    > > Here's a solution
    > > lcFilter = ""
    > > SELECT * FROM Table ORDER BY columnx TOP 20 WHERE columnx => ?lcFilter
    > > Note what is in the bottom record of columnx, it could be lastname or
    > > cust_no . Put that value in lcFilter
    > > SELECT * FROM Table ORDER BY columnx TOP 20 WHERE columnx => ?lcFilter
    > > will now return the following 20
    > > -Anders
    > What, if one knows, the desired record is about
    > page 53 to start with...
    >
    > Bye, Olaf.
    >
    >


  • Next message: jorge: "Re: paging"
    Loading