Oracle:声明中的错误

时间:2013-03-07 12:13:22

标签: sql oracle plsql oracle11g plsqldeveloper

我正在尝试在PL / SQL开发人员中执行以下查询:

DECLARE 
 P_FILENAME VARCHAR2(200):= 'file1.csv';
 P_DIRECTORY VARCHAR2(200):= 'ORA_DIR';
 P_IGNORE_HEADERLINES NUMBER := 1;

BEGIN
 Load_file( P_FILENAME => P_FILENAME, P_DIRECTORY => P_DIRECTORY, P_IGNORE_HEADERLINES =>     P_IGNORE_HEADERLINES );
END

我收到错误:

ORA-06550: line 9, column 0:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

我在哪里错了。

1 个答案:

答案 0 :(得分:3)

你在end声明中遗漏了一个半冒号:

DECLARE 
 P_FILENAME VARCHAR2(200):= 'file1.csv';
 P_DIRECTORY VARCHAR2(200):= 'ORA_DIR';
 P_IGNORE_HEADERLINES NUMBER := 1;

BEGIN
 Load_file( P_FILENAME => P_FILENAME, P_DIRECTORY => P_DIRECTORY, 
           P_IGNORE_HEADERLINES =>     P_IGNORE_HEADERLINES );
END;
/