Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01403: no data found during execution of a trigger
ORA-01403: no data found during execution of a trigger [message #121571] Mon, 30 May 2005 14:56 Go to next message
nicole bryan
Messages: 1
Registered: May 2005
Junior Member
Hi Guys,
I've been using oracle sql for a while and I just ran into this problem. I keep getting ORA-01403: no data found when I try to update LAB using values that should work and values that shouldnt work.
Here's the trigger:

create or replace trigger checkcity
after insert or update of population on LAB
declare
cursor citypop is select * from COUNTRY;
totalpop COUNTRY.population%TYPE;
begin
for rec in citypop loop
select sum(population) into totalpop from LAB where
lower(country)=lower(rec.c_id) group by country;
if totalpop>rec.population then
raise_application_error(-20321,'Total of LAB population is greater than countrys population');
end if;
end loop;
end;
/
Re: ORA-01403: no data found during execution of a trigger [message #121594 is a reply to message #121571] Mon, 30 May 2005 23:38 Go to previous message
doraistud
Messages: 14
Registered: April 2005
Junior Member
Hi,
No Data Found is basically due to SELECT statement in the trigger's query. Try to query directly from LAB table if you have that data or not.
One more thing is use always exception whenever relavent. In this case use exception for SELECT stmt.
Kind Rgds
Raj
Previous Topic: Primary key definition problem
Next Topic: Exact Search using SQL
Goto Forum:
  


Current Time: Thu Apr 09 18:03:27 CDT 2026