There are two columns having datatype Decimal (16,4)
- OwnedShares
- TotalOutstandingShares
I am trying to compute percentage using these two columns and then converting it to Decimal(7,4).
Code Being used:
Convert(Decimal(7,4),Case when OwnedShares = 0 or TotalOutstandingShares = 0 then 0 else ((OwnedShares/TotalOutstandingShares)*100) end)
I am getting Error message : 'Arithmetic overflow error converting numeric to data type numeric.'
Can someone help to figure me out where am I going wrong?