Groxx

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: Grid ASP + MSSQL with LIMIT #95614
    Groxx
    Participant

    If you're using T-SQL 2005 or later with MSSQL, there's a much easier way:

    select Paged.* from (

    [Your select statement goes here, and include this column:]

    ROW_NUMBER() over (order by [order you desire in the end]) as RowNum

    ) as Paged

    where Paged.RowNum between @start and @end

    order by Paged.RowNum ;

    And viola :)

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!