The Oracle Validate_Conversion Function
In this article, I will talk about Oracle 12c Release 2 with a new feature on the SQL side.
Let’s start with describing the
validate_conversion function. We often encounter data type conversion problems in SQL and PL/SQL code that we write. When we encounter such situations, we often crash and end up in an uncontrolled situation. The
validate_conversion function is running at the point where we have problems with data type conversions. The logic of the function is actually quite simple. We send two parameters to the function. The first one is the data to be converted, and the other is the type of data to be converted. The function returns
0 as a result of the given parameters. If there is no discrepancy between the data and the data type,
1 is returned.
0 is returned if there is an inconsistency between the data and the data type.
via DZone.com Feed https://dzone.com
May 16, 2017 at 10:30AM