ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Query to return one digit after decimal place in SQL Server<p>Hi <a class="username" rel="chetan">chetan</a>,</p> <p>Use Cast function for rounding to 1 decimal place in SQL Server.</p> <p><strong><span style="text-decoration: underline;">Query</span></strong></p> <pre class="brush: sql">DECLARE @Electricity VARCHAR(10) SET @Electricity = &#39;3400.84&#39; SELECT CAST(@Electricity AS DECIMAL(18,1)) AS Electricity</pre> <p><strong><span style="text-decoration: underline;">Output</span></strong></p> <table border="1"> <tbody> <tr><th>Electricity</th></tr> <tr> <td>3400.0</td> </tr> </tbody> </table>, 07 Aug 2019 04:43:43 GMT