Print Page | Close Window

SELECT Top * problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=22079
Printed Date: 28 March 2026 at 9:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SELECT Top * problem
Posted By: zMaestro
Subject: SELECT Top * problem
Date Posted: 01 December 2006 at 1:01am
Hello,
 
SQL = "SELECT Top 10 LastView, ID, CountryName FROM Table Order By LastView DESC;"
 
Can anyone tell me the right way to write this? this is not functioning the right way...
I want to display the last 10 records viewed



Replies:
Posted By: MadDog
Date Posted: 01 December 2006 at 3:14am
The return is fine, but if you have multiple records with the same amount of "LastView" it will return all of them.
 
The only way to stop this is do a loop through the records and stop at 10.


-------------
http://www.iportalx.net" rel="nofollow">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net