tags:

views:

35

answers:

1

Hi,

I have a nvarchar column which also has non-English (a-z) characters like Crystal77, Bólido Comidas.

How can I specifically select the rows which contain non-English characters in that column?

Thanks

+5  A: 

All rows where any character not in the range a-z

I've used COLLATE with a binary collation to remove the false match against ó... it appears LIKE is ignoring accents but that could be because it's unicode

DECLARE @myTable TABLE (myColumn nvarchar(100))
INSERT @myTable (myColumn) VALUES ('Crystal77'), ('Bólido Comidas'), ('PlainEnglish')

SELECT * FROM @myTable
     WHERE myColumn COLLATE Latin1_General_BIN NOT LIKE '%[^ a-zA-Z]%'
gbn
Thank you so much. I did 'nt know about ^
Abey