Display Only Current Rows ?

Results 1 to 2 of 2

Thread: Display Only Current Rows ?

  1. #1
    Join Date
    Dec 1969

    Default Display Only Current Rows ?

    Hi guys, let's say I have a table with 200 rows and I want to display only the latest 100 so my page doesn't get too big. I can't figure out how to do this. I use an auto-increment ID field that starts at 1, so I have 1 through 200 but I only want to pull up 101 through 200. Is there a stament like SELECT id greater than 100 or something similar ? Of course I'll have to get the number of rows first and then subtract 100 so I know where to start but I can already do that, albeit sloppily so maybe you can help me with that as well (should I just use a session variable and increment it ?) Please help. Thanks.

  2. #2
    Join Date
    Dec 1969

    Default Top

    select top 100 from tblrecords order by id desc<BR><BR><BR>-- Whol

Posting Permissions

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