title: Avoiding TSQL Data-conversion errors
body: <p>I think this is best asked in the form of a simple example. The following chunk of SQL causes a <em>"DB-Library Error:20049 Severity:4 Message:Data-conversion resulted in overflow"</em> message, but how come?  </p>
  
  <pre><code>declare @a numeric(18,6), @b numeric(18,6), @c numeric(18,6)
  select @a = 1.000000, @b = 1.000000, @c = 1.000000
  select @a/(@b/@c)
  go 
  </code></pre>
  
  <p>How is this any different to:</p>
  
  <pre><code>select 1.000000/(1.000000/1.000000)
  go
  </code></pre>
  
  <p>which works fine?</p>