title: Replace single quotes in SQL Server
body: <p>I have this function in SQL Server to replace single quotes.</p>
  
  <p>But when I insert a single quote it throws an error on <code>Replace(@strip,''',''))</code>:</p>
  
  <pre><code>Create Function [dbo].[fn_stripsingleQuote]
      (@strStrip varchar(Max))
      returns varchar
  as
  begin
      declare @CleanString varchar(Max)
      SET @var=(Replace(@strip,'',''))
  
      return @var
  end
  </code></pre>