title: Using CAST or CONVERT in CONTAINS - SQL Server
body: <p>I'm trying to use the <code>CAST</code> or <code>CONVERT</code> functions in a SQL query like this :</p>
  
  <pre><code>SELECT *
  FROM [SQL_BMS].[dbo].[GEID]
  WHERE CONTAINS(CONVERT(nvarchar(max), NUID), 'titre')
  </code></pre>
  
  <p>or </p>
  
  <pre><code>SELECT *
  FROM [SQL_BMS].[dbo].[GEID]
  WHERE CONTAINS(CAST(NUID as nvarchar(max)), 'titre')
  </code></pre>
  
  <p>but I'm getting errors:</p>
  
  <blockquote>
    <p>Incorrect syntax near the keyword 'CONVERT'</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>Incorrect syntax near the keyword 'as'</p>
  </blockquote>
  
  <p>So how can I cast my <code>NUID</code> column from <code>Int</code> to <code>nvarchar</code>?</p>