maximum results

Results 1 to 2 of 2

Thread: maximum results

  1. #1
    Riggs Goodman Guest

    Default maximum results

    How do you make it so you will post a maximum of lets say the 4 most recent fields or something like that?

  2. #2
    Join Date
    Dec 1969

    Default SELECT TOP 4 ...

    SELECT TOP 4 * FROM table WHERE ...<BR><BR>For the 4 most recent matches, you&#039;d do:<BR><BR>SELECT TOP 4 * FROM table ORDER BY someDateField DESC<BR><BR>The DESC means "DESCending" and so sorts from most recent date to oldest date.<BR><BR>Note that doing this will get the 4 most recent records in reverse order. To put them back in forward order, use RecordSet.GetRows and then process the resultant array backwards.<BR><BR>

Posting Permissions

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