db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Perhaps a stupid question
Date Fri, 05 Feb 2010 14:25:00 GMT
Hi Ron,

If what you need is a custom sort order for string data, you can plug in 
your own custom collator. See Knut's blog for details on how to do this: 

You can also use generated columns to build user-defined ordering. See 
the following writeup for advice on how to do this: 

If these solutions don't work for you, tell us more about what you need. 
We may be able to suggest another solution or at least capture your 
requirements for a future enhancement.


Ronald Rudy wrote:
> Is there any way programmatically or otherwise to specify a java.util.Comparator type
object to sort a specific column?  I realize this flies in the face of any SQL standard or
convention, but it would be really helpful to me at the moment :).  And since Derby is Java-based,
I was wondering if there might be something "non-standard" I could do to support it ....?
> My alternative is to create an additional column in my database that will give me the
sorting I want (as it would be given by a custom Comparator class) using standard varchar
sorting, but this isn't preferable.
> Thanks,
>    -Ron

View raw message