SQL SERVER – Dividing of Two Integer to get Float Value

if you make simple devide you will get integer without round value so you need to cast int to float Ex :

    SELECT (CAST(Number1)AS FLOAT)/Number1) AS AnswerFloat1
    SELECT (CAST(Number1)AS FLOAT)/Number1) AS AnswerFloat1
  1. <code>
  2. SELECT (CAST(Number1)AS FLOAT)/Number1) AS AnswerFloat1
  3. </code>
<code>
    SELECT (CAST(Number1)AS FLOAT)/Number1) AS AnswerFloat1
</code>

Popular posts from this blog

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

C# Crop white space from around the image

The specified version string contains wildcards, which are not compatible with determinism.