Hi there,
I'm trying to create a list with an index list. Eg. I have artists:
Sting
Šuma Čovjek
Suzanne Vega
That's the sort order I'd get using an ICU collation. "Šuma Čovjek"
would be sorted as "Suma..." as expected.
Now I'd like to create an index bar by providing groups of the first
character:
SELECT SUBSTR(name,1,1), count(distinct id) FROM artists GROUP BY
SUBSTR(name,1,1) ORDER BY name COLLATE de_DE
Aren't you missing a COLLATE clause after the GROUP BY term?
... GROUP BY SUBSTR(name,1,1) COLLATE de_DE ...
TBH: I didn't even know about this. I thought the COLLATE at the end of
the statement would do it for all.
Alas, tried again to no avail. No matter whether I add it after the
GROUP BY or not, the result is the same.
I should probably have added some version information: I'm using the
Perl DBD::SQLite 1.58 (sqlite 3.22.0). I didn't see any mention of
related changes in the changelog for SQLite. What would be the easiest
(and most reliable) way to try to reproduce this without Perl? Is there
a HowTo use collations with the CLI sqlite?
--
Michael
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users