Solved

finding a highest number in a database

Posted on 2003-11-28
5
266 Views
Last Modified: 2010-05-01
How do I search a database field for the highest value and return it to a text box in VBS?
0
Comment
Question by:mattewjones
5 Comments
 
LVL 9

Accepted Solution

by:
dancebert earned 25 total points
ID: 9840339
If it's a numeric field, the SQL is

SELECT Max( fieldName ) FROM tableName
0
 
LVL 1

Assisted Solution

by:gron
gron earned 25 total points
ID: 9842479
Or you can also SELECT (fieldname) ORDER BY (fieldname) DESC
and then read the first record
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question