It was my first thought Jerry, but it didn't work to me...
Thanks anyway!

Jerry Schwartz wrote:
Aren't all of the Greek characters distinct from all of the English
characters? If so, you could test just the first letter of the field against
an IN condition, where the IN (...) lists all of the Greek characters. If
it's easier to type, you could use a NOT IN (...) test and list the English
letters. The former would be safer, just to guard against the possibility
that some non-Greek Latin characters have crept in.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


-----Original Message-----
From: nikos [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 25, 2007 9:28 AM
To: mysql@lists.mysql.com
Subject: select first letters

Hello list.
I want to select discinct the first letters of titles in a UTF8 table
but only the greek ones.
There are both english and greek charakter titles.
How can I exclude the english from selection?

My table is:

CREATE TABLE `odigos_details` (
  `id` int(11) NOT NULL auto_increment,
  `cat` tinyint(3) default NULL,
  `territory` tinyint(3) default NULL,
  `title` varchar(150) default NULL,
  `story` text,
  `link` varchar(100) default NULL,
  `address` varchar(150) default NULL,
  `tel` varchar(50) default NULL,
  `fax` varchar(11) default NULL,
  `photo` varchar(100) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8

and I run:

SELECT DISTINCT LEFT(title,1) FROM odigos_details ORDER BY title

witch is working fine.

Thank you.
Nikos




Reply via email to