displaying records in the details block
HSTFeb 25 2008 — edited Feb 25 2008Hi,
i have table called tem_info which includes all the information about the employees. i have created a block (master) which includes 1 textbox that retreive all the dept. numbers from lov so the user can choose one of them.
I want to use this text as a filter of the employees according to the dept. no. so i created another block (details).
both blocks are related to the same table [ temp_inf].
what should i write in the trigger so all the employees under this dept displayed in the second block??!
i have tried this one; but i observed that i got an error since no more than 1 record are display [ it always display the first record returned from the query and give me an error when the returned records are more than 1]
declare
cursor curs is select fname,mname,lname,emp_id from emp_inf where division_code=:employee.division_code;
f varchar(30);
m varchar(20);
l varchar(20);
Emp_id varchar(30);
begin
open curs;
loop
fetch curs into f,m,l, Emp_id;
exit when curs%notfound;
:EMP_AC.fname:=f;
:EMP_AC.mname:=m;
:EMP_AC.lname:=l;
:EMP_AC.emp_id:= Emp_id;
end loop;
end;
since i am a begginner, i believe that i did a silly mistake that drove this result.
help me please!!