January 21, 2008 at 10:11 pm
Hi,
How to select arabic or english when column have both english and arabic?
Please help me
January 21, 2008 at 10:58 pm
Hi
whats the collation of the column. u can use convert/CAST with collate keyworkd for getting the data in desired colllation (language) . Is this what u require ?
SELECT ....
cast(table1.col1 as VARCHAR(50)) collate ARABIC_CI_AI
from table1.
"Keep Trying"
January 21, 2008 at 11:27 pm
Hi,
Thanks for replay, But will it select rows which contains only arabic record if coulmn has both arablic and english records, also it has arabic collation on that column already?
January 23, 2008 at 1:44 am
I think it should select arabic values. Collation also depends on the regional settings of the machine from whihc the query is exeuted.
I cannot setup a Arabic collated machine, so i cant play around and tell u the exact results.
I did a application long back which had to support both arabic ane english . For this we had 2 columns one for english other for arabic. Ex:- FirstName VARCHAR(50) - Default collation english. FirstNameArabic VARCHAR(50) - collation being ARABIC_BIN. In the regional options the locale was changed (dont remeber which).
Another approach is using unicode data types
Any way check out if ur queries work with collate keyword.
"Keep Trying"
January 24, 2008 at 4:34 am
If the arabic script has no Roman/English characters in it, you should be able to use the following WHERE clause.
WHERE MyColumn not like '[a-z]%'
And if your collation is set up as case sensitive, add:
AND MyColumn not like '[A-Z]%'
Be warned, this will probably be very query intensive and could cause a major performance hit depending on how many records you're searching. But it might be the only way to do what you're attempting.
Let us know if our suggestions don't help.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply