I am porting an application that currently hits MS SQL Server to Oracle. In one method, it generates sql to cast values from a column to another type, specified by the user.

This works in MS SQL, because there CAST will return NULL if the conversion is invalid. The values that can be converted get converted, and those that don't simply become NULL. In Oracle, the statement simply returns an error that it can't cast the value.

Is there a way to emulate the MS SQL behavior in Oracle?