basically your decimal(12) can hold much more data than decimal(7,2) and since you are narrowing down [ i.e. going from a higher container decimal(12) to a lower sized container decimal(7,2) ] you cannot input anything more than 9999999.99 for then it i'll be something like trying to pour water from a 2 liter jug into a 1 liter jug; obviously there'll be an overflow
one thing you can try out is if value is less than 9999999.99 then convert else handle error
Quote:
case (when value < 9999999.99)
then CAST
else
HANDLE ERROR
end
|