Conversion failed when converting the nvarchar value '7575932.' to data type int
<p>I have this legacy code that started failing…</p>

<pre><code>UPDATE B2C 
SET B2C.dborderid = A.order_number__c
FROM b2csf B2C 
JOIN Alemania A ON B2C.actualid = A.salesforce_id 
</code></pre>

<p>I get this error:</p>

<blockquote>
  <p>Msg 245, Level 16, State 1, Line 1<br>
  Conversion failed when converting the nvarchar value '7201799-' to data type int.</p>
</blockquote>

<p>I went ahead and changed it to:</p>

<pre><code>UPDATE B2C 
SET B2C.dborderid = (CASE 
                        WHEN Isnumeric (a.order_number__c) = 1 
                           THEN CAST(a.order_number__c AS INT) 
                     END)
FROM b2csf B2C 
JOIN Alemania A ON B2C.actualid = A.salesforce_id 
</code></pre>

<p>And now I get </p>

<blockquote>
  <p>Msg 245, Level 16, State 1, Line 1<br>
  Conversion failed when converting the nvarchar value '7575932.' to data type int.</p>
</blockquote>

<p>My questions now are:</p>

<ul>
<li><p>how can I avoid this error? I don’t mind for example losing '7575932.' value.(Ideally I would like to discard '7575932.' value)</p></li>
<li><p>I am trying my best to follow best practices... is changing the column <code>DBorderid</code> to <code>nvarchar</code> the only "best practice" alternative?</p></li>
</ul>

<p>(<em>I am using SQL Server 2008</em>)</p>