SELECT * FROM table name where column name like '%[acridine-seat]% '
II. include English characters
SELECT * FROM table name where column name like '%[a-z]% '
Third, contains the pure digital
SELECT * FROM table name where column name like '%[0-9]% '
MSSQL Determines whether the field contains Chinese characters
Find records that contain Chinese characters
SELECT * from [table name] where not PATINDEX ('%[-do]% ', [Field name]) =0
find records that do not contain Chinese characters
SELECT * from [table name] where PATINDEX ('%[-do]% ', [Field name]) =0 function:
CREATE FUNCTION [dbo]. [UDF_ISCONTAINCHINESE_BY_SLU]
(@inString nvarchar (1000))
RETURNS int
As
BEGIN
DECLARE @flag int
DECLARE @valueLength int
SET @valueLength = LEN (@inString)
DECLARE @i int
SET @i = 1
While @valueLength >= @i
BEGIN
DECLARE @ChcekValue int
SELECT @ChcekValue = ASCII (SUBSTRING (@inString, @i,1))
--select @ChcekValue
if (@ChcekValue > 122)
BEGIN
--With Chinese
SET @flag = 1
--Jump out
Break
END
ELSE
BEGIN
SET @flag = 0
END
SET @i = @i +1
END
RETURN @flag
END
/*****************************************/
--sql Determines whether the field value has Chinese
Create function fun_getcn (@str nvarchar (4000))
returns nvarchar (4000)
as
begin
D Eclare @word nchar (1), @CN nvarchar (4000)
Set @CN = '
while Len (@str) >0
begin
Set @word =left (@str, 1)
If Unicode (@word) between 19968 and 19968+20901
Set @[email protected][email protected]
Set @str = Right (@str, Len (@str)-1)
End
Return @CN
End
Select DBO.FUN_GETCN (' asdkg forum KDL ')
--Forum
Select DBO.FUN_GETCN (' asdkg theory Altar kdl ')
--Altar
Select DBO.FUN_GETCN (' ASDKDL ')
--null