MetricSign
Start free
Medium severitydata

Oracle Database Error:
ORA-01403

What does this error mean?

A SELECT INTO statement in PL/SQL returned no rows when exactly one row was expected.

Common causes

  • 1A lookup or enrichment stored procedure expects a matching row but the source data has no match
  • 2Pipeline passes an ID that does not exist in the reference table
  • 3The reference table is empty (e.g. not yet seeded or truncated by a previous step)
  • 4WHERE clause is too restrictive

How to fix it

  1. 1Step 1: Add exception handling in the stored procedure: `EXCEPTION WHEN NO_DATA_FOUND THEN <handle gracefully>`;
  2. 2Step 2: Use a cursor or SELECT COUNT(*) before SELECT INTO to check if data exists.
  3. 3Step 3: Verify the reference table is populated before the lookup step runs.
  4. 4Step 4: Add a prerequisite check in the ADF pipeline to validate the lookup table is not empty.
  5. 5Step 5: If the lookup is optional, return NULL instead of raising the exception.

Example log output

ORA-01403: no data found
ORA-06512: at "SCHEMA.LOOKUP_PROCEDURE", line 45
ORA-06512: at line 1

Frequently asked questions

Is ORA-01403 the same as a SQL NOT FOUND?

In PL/SQL, yes — SELECT INTO raises ORA-01403 when no rows are returned. Cursor-based code uses the %NOTFOUND attribute instead and does not raise this exception.

Source · docs.oracle.com/error-help/db/ora-01403

Other data errors