title: Different behaviour if cast bigint on SQL Server and SQL LocalDB
body: <p>I have following function on SQL Server and LocalDB:</p>
  <pre><code>CREATE FUNCTION [dbo].[ConvertToLong]
  (
      @Value Varchar(200)
  )
  RETURNS Bigint
  AS
  BEGIN
      If ISNUMERIC(@Value)&lt;&gt;1
      Return 0
      Else
      Return Cast(@Value as bigint)
  
      Return 0
  END
  </code></pre>
  <p>when calling this function like this:</p>
  <pre><code>SELECT dbo.[ConvertToLong]('13668433347')
  </code></pre>
  <p>I receive different results:</p>
  <blockquote>
  <p>SQLServer: <code>13668433347</code></p>
  </blockquote>
  <blockquote>
  <p>LocalDB: <code>Arithmetic overflow error converting expression to data type int.</code></p>
  </blockquote>
  <p>Any ideas what is the problem and how to fix it for LocalDB?</p>