title: VARCHAR to DECIMAL
body: <p>I want to convert a <code>varchar(max)</code> column to <code>decimal(10,4)</code>.</p>
  <p>When I try to use <code>cast</code> or <code>convert</code> I am getting an arithmetic overflow exception. The issue is that the data stored in the varchar column may contain different precisions and different scales. For example, 123456789.1234567', 1.12345678 or 123456.1234.</p>
  <p>For values like 123456.1234 it is converting with out any issue but for other values I am having some problems.</p>