title: Is there a way to cast float as a decimal without rounding and preserving its precision?
body: <p>So it appears that if you</p>
  
  <pre><code>CAST(field1 as decimal) field1
  </code></pre>
  
  <p>this will automatically add rounding. </p>
  
  <p>The original is defined as:</p>
  
  <p>field1  type:float  length:8    prec:53</p>
  
  <p>I need to cast it to decimal, because I need my Entity Framework layer to generate this field as decimal (instead of double).</p>
  
  <p>Is there a way to cast it as decimal, so that it preserves original precision, and doesn't round? </p>
  
  <p>I would like to avoid having to declare the precision in the cast, because:</p>
  
  <ol>
  <li>there are 100's of fields involved with varying precision, and;</li>
  <li>if the underlying table changes in the future, it could cause unforeseen bugs to emerge, and;</li>
  <li>makes the management more difficult.</li>
  </ol>