Create or replace package body file as
procedure filehandler as
declare
V_PERSON PERSON%ROWTYPE;
FID UTL_FILE.FILE_TYPE;
FOLDER_NAME VARCHAR(50) := 'GID_FILE';
FILE_NAME VARCHAR(50) :='bhanu.txt';
cusor test_persondetails is
select personid, personnum,fullnm from person where rownum<=10;
begin
open test_persondetails;
FID := UTL_FILE.FOPEN (FOLDER_NAME, FILE_NAME, 'A');
fetch test_persondetails into V_person;
DBMS_OUTPUT.PUT_LINE(V_PERSON);
UTL_FILE.PUT_LINE (FID,V_PERSON);
UTL_FILE.FCLOSE (FID);
close test_persondetails;
end test_filehandler;
end test_file;
我收到有關取聲明瞭一些錯誤,可以請你建議我可以做的是代碼的變化......ROWTYPE並獲取命令錯誤
不需要大寫所有字母!還有一個錯字(CUSOR而不是CURSOR)。 – Benoit 2011-03-17 10:35:33
「有些錯誤」並不完整。這些錯誤有數字和文字,可能有助於我們理解它們是什麼... – 2011-03-17 11:18:35