Solved

how to select text depend on the localization

Posted on 2013-11-12
3
350 Views
Last Modified: 2013-11-17
Hi Experts
i have a table with one column that accept Arabic and English text for example some of the row have Arabic text and other rows have English text, is there any way in SQL or .net to view only Arabic text or the opposite way

thank you
0
Comment
Question by:AZZA-KHAMEES
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39641399
What kind of text appears in this field?  Sentences?  Abbreviations?  ...?

If the data is in sentence form or similar, using complete words, in English you are guaranteed to have at least one vowel (a,e,i,o,u), so you could try select statements like the following.

For English:

SELECT * FROM YourTable 
WHERE YourField LIKE '%a%' OR YourField LIKE '%e%' OR YourField LIKE '%i%' OR YourField LIKE '%o%' OR YourField LIKE '%u%'

Open in new window


And try the opposite to isolate Arabic records:

SELECT * FROM YourTable 
WHERE NOT (YourField LIKE '%a%' OR YourField LIKE '%e%' OR YourField LIKE '%i%' OR YourField LIKE '%o%' OR YourField LIKE '%u%')

Open in new window

0
 
LVL 4

Accepted Solution

by:
rshq earned 500 total points
ID: 39649019
Hi

  You can use ASCII , LTrim and RTrim function.
  In this code return only arabic column

 
Select  YourColumn from yourtable where 
            ASCII(substring(Ltrim(Rtrim(YourColumn)),1,1))>=194 and ASCII(substring(Ltrim(Rtrim(YourColumn)),1,1))<=246

Open in new window

0
 

Author Closing Comment

by:AZZA-KHAMEES
ID: 39654428
perfect
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Merge join vs exist 3 37
Need help for captcha 2 38
Need to find a web event on the IIS server 4 46
Timeouts during development 3 25
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question