林檢索多行上存儲的過程工作在我要檢索一組結果,並分別處理每個元素,然後返回整個結果。(使用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