我有以下过程应该将一些数据写入文件。
CREATE OR REPLACE PROCEDURE export_to_xml
IS
F UTL_FILE.FILE_TYPE;
CURSOR c_cursor IS
SELECT x FROM (select xmlelement( "user", xmlforest( uname, action, time ) ) as x from table_log);
action c_cursor%ROWTYPE;
BEGIN
F := UTL_FILE.FOPEN('XML', 'log.xml', 'w');
OPEN c_cursor;
LOOP
EXIT WHEN c_cursor%NOTFOUND;
FETCH c_cursor INTO action;
UTL_FILE.PUT(F, action.x);
UTL_FILE.NEW_LINE(F);
END LOOP;
CLOSE c_cursor;
UTL_FILE.FCLOSE(F);
END;
/
但是当我尝试编译该过程时出现以下错误
PLS-00306: wrong number or types of arguments in call to 'PUT'
任何人都知道问题的原因可能是什么?我知道它来自UTL_FILE.PUT(F, action.x);
但我没有看到任何其他方式来引用光标。