Forums
This topic is locked
How do I select the highest value?
Posted 27 Oct 2002 11:40:48
1
has voted
27 Oct 2002 11:40:48 Russell Marshall posted:
I want to create a recordset to select the last invoice added to a dbase.When inserted, each invoice has the invID field generated automatically so to select the newest invoice I want to create the recordset to select the record with the highest invID.
I have tried the following but I get errors
SELECT MAX invID
FROM acc_Invoice
Access.mdb, asp, vbscript. UID4
Russell
Replies
Replied 28 Oct 2002 09:12:02
28 Oct 2002 09:12:02 Vince Baker replied:
Try this...
SELECT invID
FROM acc_Invoice
ORDER BY invID DESC
That will give you the last record entered.
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
SELECT invID
FROM acc_Invoice
ORDER BY invID DESC
That will give you the last record entered.
Regards
Vince
Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting