Oracle Error ORA-19241: XPDY0021 – cast to type string failed

Oracle Error Message

ORA-19241: XPDY0021 – cast to type string failed

Reason for the Error

The value inside a cast expression could not be cast to the required type.

Solution

Fix the input to the cast expression to be of a castable type.