I have an issue with rounding the decimal to nearest integer.
if value = 123.45, I need to round it to 123 if value = 123.54, I need to round it to 124 I have achieved this with the cast(123.54 as decimal(10,0)) new_value the problem is with the values of this kind 123.50
as per the requirements 123.50 should be converted into 123, but the formula cast(123.54 as decimal(10,0)) is converting it into 124.
As per your requirement, you can use CASE statement to achieve the same. Extract last 2 digits by SUBSTR function and if it is >=50 then subtract the same from the number else cast the number to the next digit.