title: using ISNUMERIC() with sql_variant SQL Server
body: <p>How can I use <code>ISNUMERIC()</code> function with <code>sql_variant</code> datatype?</p>
  
  <p>This following code doesn't work </p>
  
  <pre><code>DECLARE @x sql_variant 
  SET @x = 3 
  IF ISNUMERIC(@x) = 1 
   SELECT 'Numeric'
   ELSE
  SELECT ' NOT' 
  </code></pre>
  
  <p>Error :</p>
  
  <blockquote>
    <p>Msg 8116, Level 16, State 1, Line 4<br>
    Argument data type sql_variant is invalid for argument 1 of isnumeric function.</p>
  </blockquote>
  
  <p>But this works </p>
  
  <pre><code>IF ISNUMERIC(CAST(@x AS INT)) = 1 
  </code></pre>
  
  <p>is there is any way of making this happened with out <code>CAST()</code></p>
  
  <p>Haven't found any thing useful on google regarding this issue thanks , I'm using 
  SQL Server 2008 R2</p>