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 Any way to sort result set? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Any way to sort result set?" Watch "Any way to sort result set?" New topic
Author

Any way to sort result set?

Christopher Paul
Greenhorn

Joined: Oct 05, 2005
Posts: 4
My program needs to display different "views" of a database. Basically I need the user to be able to sort the result set for any column.

Is there any slick way to do this?

I was thinking of putting the entire result set into a two-dimensional array, and then trying to sort it, but that seems inefficient.

Thanks!
Christopher Paul
Greenhorn

Joined: Oct 05, 2005
Posts: 4
Ok, so I'm an idiot and didn't know about the ORDER BY command in SQL.

:roll:
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Oh.
Thank you for the update
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Any way to sort result set?