Print Page | Close Window

last 10 from a field

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=12757
Printed Date: 30 March 2026 at 11:05pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: last 10 from a field
Posted By: Lucent
Subject: last 10 from a field
Date Posted: 29 November 2004 at 7:53pm
hi I was wondering if this can be done in asp.
 
               enteredDate
1     AAA  10/20/2004
2     BBB   11/20/2004
  | | | | | | | || | |
503  AZE  11/21/2004
 
so.. something like this in asp script
 
if the product is within last 10 from the enteredDate in descending order
then .....



Replies:
Posted By: Mart
Date Posted: 30 November 2004 at 2:20am
SELECT TOP 10 ... as you SQL query


Posted By: Lucent
Date Posted: 30 November 2004 at 10:07am
how do you do that? can you give me an example in code? thank you


Posted By: Mart
Date Posted: 30 November 2004 at 11:20am
Just change your SQL statement to something like SELECT TOP 10 Column1, Column2 FROM Table WHERE Something = SomethingElse


Posted By: xeerex
Date Posted: 30 November 2004 at 11:24am
Works in Access

strSQL = "SELECT TOP 10 * From tblMytable WHERE Date < Now() ORDER BY Date DESC"


Something like that?


-------------
http://webspacegeeks.com - Need Hosting, Domains, Dedicated Servers?
http://www.smartergeek.com - web design | pc support | training | podcasts | video production


Posted By: Lucent
Date Posted: 30 November 2004 at 12:40pm
is it possible to do this in IF statement?


Posted By: Mart
Date Posted: 30 November 2004 at 1:33pm
No... If statements evaluation whether a statement is true or false....


Posted By: Mart
Date Posted: 30 November 2004 at 1:33pm
Originally posted by Mart Mart wrote:

No... If statements evaluate whether a statement is true or false....


Posted By: Mart
Date Posted: 30 November 2004 at 2:16pm
huh, editing doesn't work



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