2

I have one table in MySQL which stores clients information. There are two description info columns like CLIENT_DETAIL_INFO and CLIENT_DETAIL_INFO_A

There are more than 5 thousand records under clients table.

What I want is, to identify Arabic column CLIENT_DETAIL_INFO_A - and it contains English records, not Arabic values in that column.

How can I identify and prepare a list of primary id of such records?

Please suggest.

Aditya P Bhatt
  • 21,431
  • 18
  • 85
  • 104

2 Answers2

3

One Way

You can identify based on its REGEXP

SELECT CLIENT_DETAIL_INFO_A  FROM tableName WHERE NOT CLIENT_DETAIL_INFO_A  REGEXP '[A-Za-z0-9]';

for reference

http://dev.mysql.com/doc/refman/5.1/en/regexp.html

Another Way

Based on unicode value like for arabic range is 0600 - 06E0

for reference

http://www.tamasoft.co.jp/en/general-info/unicode.html

Parag Chauhan
  • 35,760
  • 13
  • 86
  • 95
1

Thanks guys for stopping by, below is the perfect query for result I wanted:

SELECT column_name FROM table_name WHERE NOT column_name RLIKE '[[:<:]][^\u0000-\u007F]+[[:>:]]'

Hope it helps someone else !

Aditya P Bhatt
  • 21,431
  • 18
  • 85
  • 104