SEL CAST('1.985' as DECIMAL(10,0)
If you try to cast it to Decimal, it will round the value. I am not sure of CEIL function.
Thanks & Regards,
The one mentioned by Adarsh will work in the first case but not in the second case.sel cast(4.3505 as decimal(10,0)) gives the result as 4. Any casting you do like this with less than 0.5 will point to the preceding number and greater than that will point to the next number. but if you want to resort to 4+ to point to 5 then you need to use case statment.
SEL CASE WHEN COL1 - CAST (COL1 AS DECIMAL(10,0)) = 0 THEN COL1
ELSE CAST(COL1 AS DECIMAL(10,0)) + 1
You are right, the CEIL and FLOOR functions are available in TD 14.