[Solved] Order by COLLATE

Discuss the database features
Post Reply
mihmih
Posts: 111
Joined: Wed Feb 18, 2015 9:21 pm

[Solved] Order by COLLATE

Post by mihmih »

Hi,

my base is connected to MYSQL. I have a problem with the order of the records in the queries created in the base. Is there any function (worked in HSQLDB) that allows such queries to be sorted by a specific language, in my case a polish language?

If I do

Code: Select all

ORDER BY column1 COLLATE utf8_unicode_ci 
and select SQLdirect, it works. But I would like it to work without directSQL. Does anyone know how to deal with it?
Last edited by mihmih on Wed Jan 10, 2018 2:36 pm, edited 1 time in total.
LibreOffice 4.2 on Windows7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: order by COLLATE

Post by Villeroy »

http://www.mysqltutorial.org/mysql-collation/
MySQL allows you to specify character sets and collations at four levels: server, database, table, and column.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mihmih
Posts: 111
Joined: Wed Feb 18, 2015 9:21 pm

Re: Order by COLLATE

Post by mihmih »

Ok, I had the appropriate COLLATION set, but there is still a problem with the letter 'Ł' in my language. But I used

Code: Select all

ORDER BY REPLACE (column_name, 'Ł'. 'LZ')
LibreOffice 4.2 on Windows7
Post Reply