Oracle E-Business Suite (EBS) is a comprehensive suite of integrated business applications designed to help enterprises manage their business processes. It includes modules for financials, supply chain management, human resources, and more. EBS is widely used for its robust functionality and scalability, making it a popular choice for large organizations.
When working with Oracle EBS, you may encounter the error code ORA-01403: no data found. This error typically arises during the execution of a PL/SQL block, particularly when a SELECT INTO
statement is used. The symptom is that the expected data is not retrieved, leading to an interruption in the process.
This error is commonly observed in scenarios where the application expects a single row of data to be returned, but the query does not find any matching records in the database.
The ORA-01403: no data found error occurs when a SELECT INTO
statement fails to return any rows. In Oracle PL/SQL, a SELECT INTO
statement is used to fetch data into variables. If the query does not find any data, Oracle raises this exception.
This error is raised because Oracle expects the SELECT INTO
statement to return exactly one row. If no rows are found, the exception is triggered, indicating that the data retrieval was unsuccessful.
To resolve the ORA-01403: no data found error, follow these steps:
Ensure that the query used in the SELECT INTO
statement is correct. Check the table name, column names, and any conditions applied in the WHERE
clause. Make sure that the data you expect to retrieve actually exists in the database.
Implement exception handling in your PL/SQL block to gracefully handle the ORA-01403 error. Use the EXCEPTION
block to catch the error and take appropriate action, such as logging the error or providing a default value.
BEGIN
SELECT column_name INTO variable_name FROM table_name WHERE condition;
EXCEPTION
WHEN NO_DATA_FOUND THEN
-- Handle the exception
DBMS_OUTPUT.PUT_LINE('No data found.');
END;
If there is a possibility of retrieving multiple rows, consider using a cursor instead of SELECT INTO
. Cursors allow you to fetch multiple rows and process them one at a time.
DECLARE
CURSOR c IS SELECT column_name FROM table_name WHERE condition;
variable_name table_name.column_name%TYPE;
BEGIN
OPEN c;
FETCH c INTO variable_name;
IF c%NOTFOUND THEN
DBMS_OUTPUT.PUT_LINE('No data found.');
END IF;
CLOSE c;
END;
For more information on handling exceptions in PL/SQL, refer to the Oracle PL/SQL Exceptions Documentation. To learn more about cursors, visit the Oracle PL/SQL Cursors Guide.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo