-- TO REMOVE ALL UNWANTED TERMS FROM THE STRING AND DISPLAY CHINESE , RUSSIAN AND ENGLISH, DUTCH, GERMAN.... CHARACTERS
CREATE PROCEDURE
[dbo].[XXX]
@UserName nvarchar(32)
AS
BEGIN
-- SET NOCOUNT ON
added to prevent extra result sets from
-- interfering with
SELECT statements.
SET NOCOUNT ON;
Declare
@strText as nvarchar(500)
select
@strText = Replace(SearchText,N'^',N'')
from
TABLENAME
where
UserName = @UserName
While PatIndex(N'%[^a-z^A-Z^0-9^А-Я^а-я^诶-贼德^一-龥 ]%', @strText) > 0
BEGIN
Set
@strText = Stuff(@strText, PatIndex(N'%[^a-z^A-Z^0-9^А-Я^а-я^诶-贼德^一-龥 ]%', @strText), 1, ' ')
END
select
@strText as UserKeyword
END
Comments
Post a Comment