Paging and sorting resultsets

  • Thread starter Carlos Durán Urenda
  • Start date
C

Carlos Durán Urenda

Hi

Who I Can do it:

with the SQL Sentence ...
SELECT TOP 50 FROM Table ORDER BY Id
I get First 50 rows from a table

with Sentence ...
SELECT TOP 50 FROM Table WHERE Id > LastRowId ORDER BY Id
I get the next 50 rows from a table (next resultset page)

But. if i want order by another field, how can i get the next resultset?

Tnks
CD
 
Top