Selecting Rows in groups

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Shallotx (Shallotx_at_discussions.microsoft.com)
Date: 12/01/04


Date: Wed, 1 Dec 2004 06:47:08 -0800

I have seen a mumber of posts on this subject, but am still unsure as how to
implement.

In my Windows Forms application, I am dynamically building a query based on
criteria the user chooses. In the event that the query will return a larger
number of rows (say 100 for discussion purposes), I want to return the rows
in groups (say 10 for discussion purposes). I will then allow the user to
return subsequent groups of 10 records if they desire.

I understand I could write SELECT TOP 10 * FROM TABLE to return records
1-10, but how do I then retreive 11-20, 21-30 etc. In the old days I know I
could use Cursors, but I believe there are better ways.

Thank you



Relevant Pages

  • Re: Selecting Rows in groups
    ... >I have seen a mumber of posts on this subject, but am still unsure as how ... > In my Windows Forms application, I am dynamically building a query based ... > in groups (say 10 for discussion purposes). ... > return subsequent groups of 10 records if they desire. ...
    (microsoft.public.sqlserver.programming)
  • Re: Selecting Rows in groups
    ... many will still apply to a windows forms app. ... > In my Windows Forms application, I am dynamically building a query based ... > in groups (say 10 for discussion purposes). ... > return subsequent groups of 10 records if they desire. ...
    (microsoft.public.sqlserver.programming)
  • Panasonic TX28 Widescreen Query...
    ... my purposes!). ... My only query is, when I power up the TV from cold, as the image appears on ...
    (sci.electronics.repair)
  • Re: SQL Server View in VB
    ... FYI....for most intents and purposes, views are treated pretty much just ... querying data twice....once for the view itself and again for your query ... the sql of the view with the sql of the query where possible to avoid ...
    (microsoft.public.vb.general.discussion)
  • Re: Default Query Result Ordering Details
    ... I am aware that for all intents ... and purposes, the query results for a query without an ORDER BY clause ...
    (comp.databases.oracle.server)