我正在尝试使用pl sql从文件读取数据但是无效的目录路径不断弹出
这是代码
Create or Replace procedure test_read
IS
v_line VARCHAR2(2000);
v_file UTL_FILE.FILE_TYPE;
--names_adjusted VARCHAR2(70) := 'Anna,Matt,Joe,Nathan,Andrew,Aaron,Jeff';
comma_location NUMBER;
comma_location2 NUMBER;
v_deptno NUMBER;
v_dname VARCHAR2(25);
v_loc VARCHAR2(25);
v_dir VARCHAR2(250);
v_filename VARCHAR2(50);
BEGIN
DBMS_OUTPUT.PUT_LINE( 'hello from a' );
v_dir := 'D:\\';
v_filename := 'Departments.txt';
v_file := UTL_FILE.FOPEN(v_dir, v_filename, 'r');
DBMS_OUTPUT.PUT_LINE( 'hello from b' );
EXCEPTION
WHEN no_data_found THEN
exit;
END;
UTL_FILE.FCLOSE(v_file);
END;
我在Windows 7上运行oracle 11g xe