当我替换 'Ê' sql 更改所有 'Ê' 和 'É' 时,我该如何解决?
when i replace 'ت' sql change all 'ت' and 'ة', how can i fix it?
当我替换 'Ê' 时 sql 更改所有 'Ê' 和 'É'
declare @name as nvarchar(max);
set @name = N'ةاتی تو را است ت';
declare @char1 as nvarchar;
set @char1 = N'ت';
declare @char2 as nvarchar;
set @char2 = N'ب';
select replace(@name, @char1 ,@char2);
试试这个
declare @name as nvarchar(max);
set @name = N'ةاتی تو را است ت';
declare @char1 as nvarchar;
set @char1 = N'ت';
declare @char2 as nvarchar;
set @char2 = N'ب';
select replace(@name Collate Persian_100_CI_AI, @char1 ,@char2);
要查看所有可用的排序规则,您可能需要更改 CaseSensitive/Insensitive and/or 重音...
SELECT * FROM ::fn_helpcollations() FH WHERE name LIKE '%Persian%'
对于其他问题和结果,google 也可能是个好主意,请参阅 Problem with Persian_CI_AI collation And 'ك' character
当我替换 'Ê' 时 sql 更改所有 'Ê' 和 'É'
declare @name as nvarchar(max);
set @name = N'ةاتی تو را است ت';
declare @char1 as nvarchar;
set @char1 = N'ت';
declare @char2 as nvarchar;
set @char2 = N'ب';
select replace(@name, @char1 ,@char2);
试试这个
declare @name as nvarchar(max);
set @name = N'ةاتی تو را است ت';
declare @char1 as nvarchar;
set @char1 = N'ت';
declare @char2 as nvarchar;
set @char2 = N'ب';
select replace(@name Collate Persian_100_CI_AI, @char1 ,@char2);
要查看所有可用的排序规则,您可能需要更改 CaseSensitive/Insensitive and/or 重音...
SELECT * FROM ::fn_helpcollations() FH WHERE name LIKE '%Persian%'
对于其他问题和结果,google 也可能是个好主意,请参阅 Problem with Persian_CI_AI collation And 'ك' character