Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - last 10 from a field
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

last 10 from a field

 Post Reply Post Reply Page  12>
Author
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post Topic: last 10 from a field
    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 .....
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 2:20am
SELECT TOP 10 ... as you SQL query
Back to Top
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 10:07am
how do you do that? can you give me an example in code? thank you
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Post Options Post Options   Thanks (0) Thanks(0)   Quote xeerex Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 12:40pm
is it possible to do this in IF statement?
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 1:33pm
No... If statements evaluation whether a statement is true or false....
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2004 at 1:33pm
Originally posted by Mart Mart wrote:

No... If statements evaluate whether a statement is true or false....
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.