If you're only ordering strings then the ideas suggested earlier should
work. If your query returns a ResultSet with mixed data types (string, date,
integer, float, etc) and you want to be able to sort according to any of
these data types at run time (sort by date for example) then none of these
solutions will work. Let me know if this is the problem you're trying to put
across. There is a solution but it's rather complicated for newbies.
Mohamed.

-----Original Message-----
From: JustinMacCarthy [mailto:[EMAIL PROTECTED]]
Sent: 29 August 2001 15:39
To: JRun-Talk
Subject: Re: Java Sorting


Basically it's needed to re-order a query pulled for the DB
The same query is pulled back again & again the only difference being order,
So want to cache the query first time and just reorder to output
I'll try a few of thing suggested


Justin

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 3:05 PM
Subject: Re: Java Sorting


>
> J,
>         There are many algorithms out there for sorting. Perhaps a
quicksort
> would be best. You can download it at javasoft.com, but you may have to
modify
> it for handling strings. I would recommend reading up on it before
attempting to
> use it. A good basic book on this would be "Data Structures & Algorithm
Analysis
> in Java" by Weiss.
>
> Dave
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to