Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting overflow error when executing pl/sql query

Tags:

People also ask

How do you resolve ORA 01426 numeric overflow?

To resolve this issue, identify any such data issue, check if invalid numeric data can be removed/corrected from the source before loading to Oracle target. Work with DBA team and Oracle Support to identify which field is actually throwing an error. Pick the insert query. Append it to the values.

What is the error code prefix for PL SQL errors?

PL/SQL warning messages all use the prefix PLW .

What is Raise_application_error in PL SQL?

The RAISE_APPLICATION_ERROR procedure accepts user-defined error-number values from -20000 to -20999. The SQLCODE that is returned in the error message is SQL0438N. The SQLSTATE contains class 'UD' plus three characters that correspond to the last three digits of the error-number value.

Which of the following exception is raised due to PL SQL memory corruption?

It is raised when PL/SQL ran out of memory or memory was corrupted. It is raised when a SELECT INTO statement returns more than one row. It is raised when an arithmetic, conversion, truncation, or sizeconstraint error occurs. It is raised when an attempt is made to divide a number by zero.


When I run pl/sql query[through a stored procedure] using my C# code,I get an error: How do I resolve the same?Please advise. Note:am passing false for providerSpecificTypes in the code.

 Error Message:
 System.Data.OracleClient.OracleException: OCI-22053: overflow error   
 at System.Data.Common.DbDataAdapter.FillErrorHandler(Exception e, DataTable dataTable, Object[] dataValues)    
 at System.Data.Common.DbDataAdapter.FillLoadDataRowChunk(SchemaMapping mapping, Int32 startRecord, Int32 maxRecords)    
 at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)    
 at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
 at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)    
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,

Here is the code:

DataSet ds = new DataSet(); 
        try 
        { 
            this.OpenDBConnection(); 
            this.dbAdapter.ReturnProviderSpecificTypes = providerSpecificTypes; 
            this.dbAdapter.Fill(ds); 
        } 
        catch 
        { 
            throw; 
        } 
        finally 
        { 
            CloseDBConnection(); 
            this.cmd.Parameters.Clear(); 
        }
            return ds;

Query:

SELECT client_id, TO_CHAR (business_dt, 'MM/DD/YYYY') AS business_dt 
       , mkt_type
       , mkt_name
       , product_name
       , period
       , TO_CHAR (start_dt, 'MM/DD/YYYY') AS start_dt
       , TO_CHAR (end_dt, 'MM/DD/YYYY') AS end_dt
       , duration
       , term
       , NULL AS strike_price
       , instrument_type
       , final_price
       , NULL AS product_price
       , units
       ,  NULL AS expiry_dt
       , mkt_close
       , cons_flag