This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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


Win a copy of Head First Android this week in the Android forum!
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
 
 
subject: Any way to sort result set?
 
jQuery in Action, 3rd edition