CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 redeading the last 10 database entries

Print topic Send  topic

Author Message
dwelsh
Posted: 04/28/2003, 9:46 AM

Im creating a web site for a local golf course. I have to retrieve the last 10 scores, to calculate a handicap.

Does anyone know how I could collect the last 10 entries(scores) a member enters.

Using ASP & Access.

Thanks
David Welsh
EMG
Posted: 04/28/2003, 12:11 PM

select TOP 10 * from GolfTable Order By DateEntered DESC

This will give you the last 10 records entered using a date stamp column, or you could to " Order By RowID DESC ", using your autonumber field.
Deryl
Posted: 04/28/2003, 12:13 PM

David,
Use the TOP specifier in a SQL statement with an order by to get the ten you want. For example, select TOP 10 * from table_name ORDER BY golf_date desc
That's assuming you have a date or sequence number to use to determine the last ten entries. Hope that helps.

Deryl
dwelsh
Posted: 05/01/2003, 8:08 AM

Thanks alot guys that work out perfectly.

Im curious, is there a site somewhere that explains the different SQL syntaxs that can be used.

I am new to using SQL statements.

David Welsh
char
Posted: 05/01/2003, 11:44 AM


www.sql.org has links to many tutorials and documentation.

There is a very good interactive tutorial at http://sqlzoo.net/

HTH
Char
dwelsh
Posted: 05/01/2003, 12:46 PM

Ill check those sites out.

David Welsh

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.