title: SQL SERVER Full Text Search - replacing text in a contains statement
body: <p>Is it possible to do a string replacement inside of a <code>CONTAINS</code> statement?  I have my code set up like so :</p>
  
  <pre><code>INSERT @searchfilter (productid, variantID)
  SELECT p.ProductID, pv.VariantID from dbo.Product p with(NOLOCK)
      JOIN dbo.ProductVariant pv with(NOLOCK) on p.ProductID = pv.ProductID 
      JOIN dbo.ProductStore ps with(NOLOCK) on p.ProductID = ps.ProductID and ps.StoreID = @storeID
      WHERE CONTAINS((dbo.vibe_GetValidSearchString(p.Name, @storeID), p.SKU), @NameField)
  </code></pre>
  
  <p>I've got an error though on the <code>CONTAINS</code> statement and I'm unable to get it to compile.  The error is <code>An expression of non-boolean type specified in a context where a condition is expected.</code></p>
  
  <p>I've also tried changing the function in the <code>WHERE</code> to be </p>
  
  <pre><code> ... WHERE CONTAINS((REPLACE(p.Name,'-',''), p.SKU), @NameField)
  </code></pre>
  
  <p>but it's giving the same error.  Any thoughts or suggestions?</p>