File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes About MAX() in MS-SQL 2000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "About MAX() in MS-SQL 2000" Watch "About MAX() in MS-SQL 2000" New topic
Author

About MAX() in MS-SQL 2000

Huang Chung-Yu
Greenhorn

Joined: Aug 29, 2004
Posts: 2
I want select a data from a db
just like as "Select MAX(grade) from gradeFrom"..
now..I want to who the MAX(grade) in jLabel..
How should I do?
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Huang Chung-Yu,

Welcome to JavaRanch!

I'm not sure I understand your question. Are you looking for a way to get a list of the names of people (or a single person) who got the highest grade, so that you can display it in a Swing application?

If so, such a query might look like this:

It's a bit simpler if you have students and grades in the same table.

As for the JLabel, you're on your own!

Jules
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About MAX() in MS-SQL 2000
 
Similar Threads
Determined identity key value
How to query a certain number of data?
Error While Creating Materialized View
subquery sql to hql
Select single value