I have this function in SQL Server to replace single quotes.
But when I insert a single quote it throws an error on Replace(@strip,''',''))
:
Create Function [dbo].[fn_stripsingleQuote]
(@strStrip varchar(Max))
returns varchar
as
begin
declare @CleanString varchar(Max)
SET @var=(Replace(@strip,'',''))
return @var
end
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…