TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lotus
NA
28
26.6k
PL SQL trigger to restrict employee in department
Nov 22 2013 12:16 AM
i am making a trigger in plsql to restrict the employees after reaching define limit but it give me error - ORA-01403: no data found on my form.anyone help
create or replace trigger DEPT_STRENTH
before insert or update on empmasterinfo
for each row
DECLARE
-- local variables here
EMP_Count NUMBER;
MAX_Strength NUMBER;
BEGIN
select d.strength
into MAX_Strength
from dept_strength d
where d.Mainid = :new.Mainid
and d.orgelementname = :new.orgelementname;
select count(e.employeeid)
into EMP_Count
from empmasterinfo e
where e.emp_status = 0
and e.Mainid = :new.mainid
and e.orgelementname = :new.orgelementname;
if MAX_Strength <= EMP_Count then
RAISE_APPLICATION_ERROR(-20101,
'Maximum Number of Employees in Department Reached');
else
null;
end if;
end DEPT_STRENTH;
Reply
Answers (
1
)
list of accounting softwares with the database used in it
c# SQLCE Create Table