林检索多行上存储的过程工作在我要检索一组结果,并分别处理每个元素,然后返回整个结果。(使用3个不同的表)使用For循环来在Oracle过程
林不太熟悉的数据库,但继承人什么我能拿出..
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;
在执行时,我收到以下错误..
an INTO clause is expected in this SELECT statement : "Select * from"
可以anyo请解释我如何纠正这个错误并获得所需的结果?
PS。即时通讯使用的是Oracle 9i中&蟾蜍9个
感谢,
汤姆
假设select返回一行。 – DCookie 2010-08-10 17:46:39