diff --git a/doc/changes/changes_4.0.5.md b/doc/changes/changes_4.0.5.md index 50c33eb82..218144b16 100644 --- a/doc/changes/changes_4.0.5.md +++ b/doc/changes/changes_4.0.5.md @@ -7,6 +7,7 @@ ## Documentation * #408: Removed PostgreSQL dialect documentation as it has been migrated to https://github.com/exasol/postgresql-virtual-schema. +* #413: Improved documentation on `ORACLE_CAST_NUMBER_TO_DECIMAL_WITH_PRECISION_AND_SCALE` ## Refactoring diff --git a/doc/dialects/oracle.md b/doc/dialects/oracle.md index fe4617552..5dfea2caf 100644 --- a/doc/dialects/oracle.md +++ b/doc/dialects/oracle.md @@ -170,9 +170,24 @@ The Oracle dialect does not support all capabilities. A complete list can be fou `NUMBER`, `NUMBER with precision > 36` and `LONG` are casted to `VARCHAR` to prevent a loss of precision. -If you want to return a DECIMAL type for these types you can set the property ORACLE_CAST_NUMBER_TO_DECIMAL_WITH_PRECISION_AND_SCALE: -This will cast NUMBER with precision > 36, NUMBER without precision and LONG to DECIMAL(36,20). -Keep in mind that this will yield errors if the data in the Oracle database does not fit into the specified DECIMAL type. +If you want to return a DECIMAL type for these types you can set the property `ORACLE_CAST_NUMBER_TO_DECIMAL_WITH_PRECISION_AND_SCALE` to `,`. +This will cast values of such types to `DECIMAL(,)`. + +For example: + +```java +CREATE VIRTUAL SCHEMA + USING ADAPTER.JDBC_ADAPTER + WITH + SQL_DIALECT = 'ORACLE' + CONNECTION_NAME = 'ORACLE_JDBC_CONNECTION' + SCHEMA_NAME = '' + IMPORT_FROM_ORA = 'true' + ORACLE_CAST_NUMBER_TO_DECIMAL_WITH_PRECISION_AND_SCALE = '2,18' + ORA_CONNECTION_NAME = 'ORA_CONNECTION'; +``` + +Keep in mind that this will yield errors if the data in the Oracle database does not fit into the specified DECIMAL type. ## Testing information