Hi all,
Im working on stored procedure where I need to retrieve a set of results and process each element individually and then return the entire result.(using 3 different tables)
Im not too familiar with databases, but heres what I was able to come up with..
create or replace procedure GET_EMP_RSLT
IS
CURSOR ecursor IS select emp_id from temp_employee where 'some condition';
BEGIN
FOR empidset in ecursor
LOOP
Select * from
(select * from payroll_info where emp_id = empidset.emp_id) a
left join
(select * from benefit_info where emp_id = empidset.emp_id) b
on a.emp_id = b.emp_id
END LOOP;
END;
On execution, I get the following error..
an INTO clause is expected in this SELECT statement : "Select * from"
can anyone please explain on how do I correct this error and get the required results?
PS. Im using Oracle 9i & TOAD 9
Thanks,
Tom