Questions tagged [ora-01403]

ORA-01403: no data found

Error: no data found

Cause: Any of the following:

  • Executing a SELECT INTO statement and no rows were returned.
  • Referencing an uninitialized row in a table.
  • Reading past the end of file with the UTL_FILE package.

Action: Terminate processing of the data.

13 questions
61
votes
5 answers

PL/SQL block problem: No data found error

SET SERVEROUTPUT ON DECLARE v_student_id NUMBER := &sv_student_id; v_section_id NUMBER := 89; v_final_grade NUMBER; v_letter_grade CHAR(1); BEGIN SELECT final_grade INTO v_final_grade FROM enrollment WHERE student_id…
Orapps
  • 631
  • 2
  • 6
  • 8
20
votes
7 answers

Why is no_data_found ORA-01403 an exception in Oracle?

If the SELECT INTO statement doesn't return at least one row, ORA-01403 is thrown. For every other DBMS I know this is normal on a SELECT. Only Oracle treats a SELECT INTO like this. CREATE OR REPLACE PROCEDURE no_data_proc IS dummy…
Stephan Schielke
  • 2,744
  • 7
  • 34
  • 40
10
votes
6 answers

Oracle: Get a query to always return exactly one row, even when there's no data to be found

I have a query like this: select data_name into v_name from data_table where data_table.type = v_t_id Normally, this query should return exactly one row. When there's no match on v_t_id, the program fails with a "No data found"…
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202
8
votes
5 answers

sql server linked server to oracle returns no data found when data exists

I have a linked server setup in SQL Server to hit an Oracle database. I have a query in SQL Server that joins on the Oracle table using dot notation. I am getting a “No Data Found” error from Oracle. On the Oracle side, I am hitting a table (not…
Don Chambers
  • 3,798
  • 9
  • 33
  • 74
3
votes
1 answer

ORA-01403 no data found in trigger execution

I have a problem here with a trigger. The purpose of the trigger is to verify that the client associated with a car registration, paid or not paid the bill in a workshop. If the client has paid all, then it is created a new service order (so far…
Pedro Vieira
  • 33
  • 1
  • 4
2
votes
2 answers

REPLACE in Oracle 10g not working as I expected, can anyone explain?

I am using oracle 10g express. I have a table named artists_i_hate, I have simplified to illustrate the problem clearer ID | Name | Opinion ----------------------------- 11 | jamesblunt | i hate him I run the statement SELECT * FROM…
rogermushroom
  • 5,486
  • 4
  • 42
  • 68
2
votes
2 answers

No_data_found exception is propagating to outer block also?

In my code i am entering the salary which is not available in employees table and then again inserting duplicate employee_id in primary key column of employee table in exception block where i am handling no data found exception but i do not why No…
Vineet
  • 5,029
  • 10
  • 29
  • 34
0
votes
1 answer

How to pass string data type to number datatype in plsql

I have procedure like this... declare v_psg varchar2(10); id_no number; begin select value into v_psg from settings_am where key = 'PSG'; select id into id_no from product where to_char(psg) in (v_psg); end;` The value returned from select value…
0
votes
1 answer

Is ORA-01403 being received by the procedure or the package being called within the procedure?

Sorry to paste the long code. I have a procedure that inserts data in a table and calls several packages. On running the below procedure, I get following error - Now I know that the error is coming at stage 3 where package…
Reeya Oberoi
  • 813
  • 5
  • 19
  • 42
0
votes
1 answer

Why I get NO_DATA_FOUND in this anonymous block?

CREATE OR replace FUNCTION Ord_ship_se (p_basketid IN bb_basket.idbasket%TYPE) RETURN VARCHAR2 IS lv_stat VARCHAR2(10); lv_numdays CHAR; lv_ordered bb_basket.dtordered%TYPE; lv_created bb_basket.dtcreated%TYPE; BEGIN SELECT…
TheNewGuy
  • 559
  • 1
  • 10
  • 27
0
votes
1 answer

Oracle11g ORA-01403 No data found using Select Into

I am quite new to Oracle and I have an issue I have been struggelig With for some hours. sample: Create Table Accounts (Id number(10),Balance number(16,3), Status Varchar2(50),Owner_Id number(10)); Create Table Transactions (Id number(10),Amount…
MrM
  • 389
  • 1
  • 8
  • 23
0
votes
1 answer

Oracle Apex page can´t fetch data after navigating to another and returning

So i have a form based on one of my table, in wich the id is generated by a function in the database, the username is get from the user in session using the variable :APP_USER and the date has a default value of to_char(sysdate). But the problem is…
Daniel Arita
  • 1
  • 1
  • 2
-1
votes
1 answer

PLSQL Trigger ORA 01403 no data found

i am making a trigger in PL-SQL to restrict employees in section/dept on my employee entry form i get ORA-01403: no data found . please anyone help me create or replace trigger DEPT_STRENTH after insert on empmasterinfo for each…
user3024346
  • 11
  • 1
  • 1