title: Why am I losing the two decimal points in this cast expression?
body: <p>What am I missing here?</p>
  
  <pre><code>select cast ( ( cast (100 * 39  as decimal )  / 41) as decimal(5,2)) 
  </code></pre>
  
  <p>gives a result of 95.12 </p>
  
  <p>but </p>
  
  <pre><code>declare @percent decimal 
  set  @percent = cast ( ( cast (100 * 39  as decimal )  / 41)  as decimal(5,2)) 
  select @percent     
  </code></pre>
  
  <p>gives a result of 95 </p>
  
  <p>What happened to the two 2 decimal points and how do I get them back into my variable?  </p>