Ensure the first value returned in the list of returned values in the DECODE function is a number. Hence, if the original DECODE looks like the following where the first value returned is NULL:
select prodid,
decode(trim(field1),'012', null,'010',null,'015',null,'016',null,'017',null,to_number(prodid)) os
from product;
Then change it to the following, so the first value returned is a numeric value, such as FIELD1, and place a condion that is never True:
select prodid,
decode(trim(field1),'xxx', field1,'010',prodid,'015',prodid,'016',prodid,'017',to_number(prodid),to_number(prodid)) os
from product;