Hello,
I’d appreciate an example how to use the SQLlite COLLATE operator.
For instance, where/how to insert it in the following sql? At the end of the string I tried adding COLLATE NOCASE or just NOCASE, but the code would not execute.
sqlr = “select vAuthor,vTitle,vVolume from kLibrary order by upper(vAuthor),vTitle,vVolume”
What I’m after is to have author “alamov” be printed before "T"s. At present I get:
Sinclair
Twain
alamov
But I dont’ think that will provide the results desired (DEJA VU!)
NOCASE - The same as binary, except the 26 upper case characters of ASCII are folded to their lower case equivalents before the comparison is performed. Note that only ASCII characters are case folded. SQLite does not attempt to do full UTF case folding due to the size of the tables required.
Meaning NOCASE affects ONLY “A” thru “Z”, of which “” is NOT a member and therefore would not be affected.
@ Paul [quote]sqlr = “SELECT vAuthor, vTitle, vVolume FROM kLibrary ORDER BY Upper(vAuthor) COLLATE NOCASE, vTitle, vVolume” [/quote]
Dave is right; I saw it, and among other variations I had already tried it, but with no result. As Dave predicted.
@Richard I do not own MBS.
BTW About listbox.sort: I find it interesting that the Finder puts “” before “T”, while a Xojo listbox.sort puts it after “Z”.
Unfortunately even with Thomas’ extension sorting doesn’t get as I would (“” before "T, etc.).
I wander how Xojo developers from countries where such characters or even accented letters like “É” are used, sort their listboxes.
Using asci-encoded strings to sort them would solve the problem only of few instances.