Forums

This topic is locked

national character set sorting

Posted 23 Jul 2003 11:19:14
1
has voted
23 Jul 2003 11:19:14 richard minks posted:
I need to solve czech special character coding in sorting column. The problem is in Czech Letters 'CH' which belongs between 'H' and 'I' not between 'B' and 'D'.



Can you help me, please, my SQL is:



--------------------------------------------------------------

SELECT *, IF(LENGTH(art_name) < 1, art_surname, CONCAT(art_surname,', ',art_name)) AS full_name, IF(art_death_pozn IS NULL OR art_death IS NULL, '', CONCAT(' ','-',' ',art_death_pozn,' ',art_death)) AS art_pomlcka, IF(art_country_2 IS NULL, art_country, CONCAT(art_country,',',' ', art_country_2)) AS art_country FROM artists, smer, artist_smer WHERE artists.art_surname LIKE '%s' AND artists.art_surname NOT LIKE '%s' AND artist_smer.artist_id = artists.artist_id AND artist_smer.smer_id = smer.smer_id ORDER BY artists.art_surname COLLATE cp1250_czech_ci

---------------------------------------------------------------



I work in PHP and using MySQL.



Thanks in advance!

Replies

Replied 23 Jul 2003 12:01:20
23 Jul 2003 12:01:20 Vince Baker replied:
I was pretty sure that you could not use an IF statement in sql.....

All of the conditions need to be in the where statement.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 23 Jul 2003 12:17:28
23 Jul 2003 12:17:28 richard minks replied:
Hi,

until I've used COLLATE statement it worked very well.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I was pretty sure that you could not use an IF statement in sql.....

All of the conditions need to be in the where statement.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic