It does not appear to respect the ascii values.
Should the order be?
fa
fá
fâ
fã
fa
fá
fâ
fã

-----Original Message-----
From: Ricardo
To: [EMAIL PROTECTED]
Sent: 4/28/04 10:05 AM
Subject: RE: SELECT DISTINCT returns an incorrect result with special char
acters

- The sort order gets incorrect:

SELECT DISTINCT BINARY(MyField)
FROM MyTable
WHERE MyField LIKE 'f%'
ORDER BY MyField

+-----------------+
| BINARY(MyField) |
+-----------------+
| fa              |
| Fâ              |
| fá              |
| Fa              |
| fã              |
| Fá              |
| fâ              |
| Fã              |
+-----------------+

- The like operator gets case-sensitive:
 
SELECT DISTINCT BINARY(MyField)
FROM MyTable
WHERE BINARY(MyField) LIKE 'f%'
ORDER BY MyField

+-----------------+
| BINARY(MyField) |
+-----------------+
| fâ              |
| fá              |
| fã              |
| fa              |
+-----------------+


 --- Victor Pendleton <[EMAIL PROTECTED]>
escreveu: > Why can you not write
> SELECT DISTINCT BINARY(col)
> FROM table1
> WHERE BINARY(col) LIKE 'criteria'
> ORDER BY col
> ?

______________________________________________________________________

Yahoo! Messenger - Fale com seus amigos online. Instale agora! 
http://br.download.yahoo.com/messenger/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to