-2

Hi anyone can help why dividing two columns results to a zero instead of a decimal value which is the correct result. Ive tried dividing other columns and they worth properly only these 2 columns. Thank a lot for anyone answering.

code and result COLUMN DATA TYPE

I tried switching the data type using CAST to float, bigint, and decimal yet the result is still 0.

Thom A
  • 88,727
  • 11
  • 45
  • 75
  • As per the linked answer, you have to cast either dividend or divisor (or both), and not the result of the division. – TotallyNewb Aug 30 '23 at 10:36
  • 1
    Please do read [How to ask](https://stackoverflow.com/help/how-to-ask) which has some info on posting images. ("DO NOT post images of code, data, error messages, etc.....") – Luuk Aug 30 '23 at 10:39
  • 1
    [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) – Thom A Aug 30 '23 at 10:55

0 Answers0