Solved

how to select text depend on the localization

Posted on 2013-11-12
3
339 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
3 Comments
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
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
Comment Utility
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
Comment Utility
perfect
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now