This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 and Relational Databases
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
 
Have you checked out Aspose?
 
subject: Any way to sort result set?
 
It's not a secret anymore!