Custom sorting in ORDER BY

2023-02-02 Thread John English
I would like to be able to specify an ORDER BY which will give me the same sort of ordering as produced by my file browser, where embedded numbers in a string with the same prefix are ordered numerically. For example: if I have strings 'x1','foo1','x2','foo10','foo5', a normal text sort will

Re: Custom sorting in ORDER BY

2023-02-02 Thread John English
On 02/02/2023 17:13, Rick Hillegas wrote: I can think of two solutions to your problem: 1) Write a custom Java collator and install it as the default sort order for all string data in your database. See the following sections in the Derby Developer's Guide:

Re: Custom sorting in ORDER BY

2023-02-02 Thread Rick Hillegas
I can think of two solutions to your problem: 1) Write a custom Java collator and install it as the default sort order for all string data in your database. See the following sections in the Derby Developer's Guide: https://db.apache.org/derby/docs/10.16/devguide/cdevcollation.html and