limiting records in Access

Results 1 to 2 of 2

Thread: limiting records in Access

  1. #1
    Join Date
    Dec 1969

    Default limiting records in Access

    Here&#039;s a little puzzle..<BR><BR>The TOP predicate in Access (ie; "SELECT TOP 10 FROM Blah ORDER BY ClickThrus DESC") .. doesn&#039;t work as I expected. In SQL it would return 10 records.. in Access it will return more than 10 records if more than 10 records have the same value for "clickthrus"<BR><BR>So I thought that the MaxRecords property of the ADO recordset might work, but, it doesn&#039;t work for Access db&#039;s<BR><BR>Any ideas as to how I can get only 10 records? Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: limiting records in Access

    because you haven&#039;t specified "TOP 10 what FROM table"<BR><BR>SELECT TOP 10 primaryKeyName FROM table<BR><BR>will give the result you expect.

Posting Permissions

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