T-SQL cast nesting
<p>I'm trying to CAST the result of this back into an integer?</p>

<pre><code>SELECT 
    CAST(7 AS DECIMAL (18,8)) * CAST(365 AS DECIMAL (18,8)) 
    / CAST(12 AS DECIMAL (18,8)) / CAST(7 AS DECIMAL (18,8))
</code></pre>

<p>The result was <code>30.416666</code></p>

<p>But I want to CAST it back to a whole number i.e. <code>30</code></p>

<p>I know it can be done by CASTING the whole lot but can't get the nesting right?</p>