Real * Bigint does not return the correct value

I have two columns on an Sql server

  • Amount as a real type
  • Price as a bigint type

The amount is 3,059.9 and the price is 29,000
Price * amount must be 88737100, but it does not return the correct value.
Should I use columns for other data types?
The result is 8.87371E + 07, how can I display it without scientific notation?

+4
source share
1 answer

Try CAST(Amount AS DECIMAL(38, 2)) * Price . Read DECIMAL and adjust accordingly depending on the number of digits and decimal places.

+1
source

All Articles