SQL Server 2008 Double-Byte Character Search

Is there a way to determine which records are double-byte characters in SQL Server 2008?

For example, I want to request all the records in Chinese, Korean and Japanese in the table, if the country is full, how can I do this?

Your input is truly appreciated.

I think I could embarrass you guys. Everything is stored in nvarchar. Some entries are in Chinese, some in Korean, some in Spanish and others. We want to learn Chinese, Japanese and Korean records to do something. It makes sense?

+5
source share
2 answers

Is there a way to determine which records are double-byte characters in SQL Server 2008?

- , CJK :

select * from tbl
where convert(nvarchar(max),convert(varchar(max),somecolumn)) != somecolumn
+5

, , , :

DECLARE @SearchString nvarchar(MAX)
...
SELECT * FROM MyTable
WHERE Country = '' and SearchField = @SearchString

, SearchField nvarchar.

nvarchar, .

nvarchar, :

SELECT OBJECT_NAME(col.OBJECT_ID) as [TableName], col.[name] as [ColName], typ.[name]
FROM sys.all_columns col
INNER JOIN sys.types typ
ON col.user_type_id = typ.user_type_id
WHERE col.user_type_id = 231
0

All Articles