Home » RDBMS Server » Server Administration » Re: What's wrong with the insert statement in a trigger?
Re: What's wrong with the insert statement in a trigger? [message #370076] Mon, 11 December 2000 14:51
Shanthi Ramayanapu
Messages: 22
Registered: October 2000
Junior Member
select 1
into var_num
from t_2
where t_2.id = :new.id;
if var_num = 0 then
.......

The above code return 1 into var_num if record is found other wise it returns no_data_found exception. Either you handle your insert statement in the exception code or you change the above select to count(*), which return 0 is no data found.

Shanthi
Previous Topic: Urgent help needed. Make a quick 50 bucks
Next Topic: plsql
Goto Forum:
  


Current Time: Wed May 01 23:58:27 CDT 2024