I know how to set a negative value to zero:
select case when x < 0 then 0 else x end as result from tab
But what if "x" is a ver