| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> UTL_FILE Problem
Hi!
I want to create textfiles stored on my local computer. The should contain various data from my Oracle 8 Database. But it wont work and I dont know why. I would be thankfull for any suggestions. The path exists on my local Win2000 machine.
Thanks
Christian
SQL> ru
1 DECLARE
2 TYPE GenericCurTyp IS REF CURSOR;
3 c1 GenericCurTyp;
4 sess_rec stat_tab%ROWTYPE;
5 value NUMBER;
6 cumpercent NUMBER;
7 filehand UTL_FILE.FILE_TYPE;
8 buffer VARCHAR2 (100);
9 BEGIN
10 filehand := UTL_FILE.FOPEN ('C:\Daten\Output\', 'test1.txt',
); -- The problem seems to be to open the file
11 OPEN c1 FOR
12 SELECT * FROM stat_tab ORDER BY value;
13 LOOP
14 FETCH c1 INTO sess_rec;
15 EXIT WHEN c1%NOTFOUND;
16 value := .....
17 cumpercent := .....
18 buffer := to_char(value) || ' ' ||
to_char(cumpercent);
19 UTL_FILE.PUT_LINE (filehand, buffer);
20 END LOOP;
21 CLOSE c1;
22 UTL_FILE.FCLOSE (filehand);
23 COMMIT;
ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.UTL_FILE", line 98 ORA-06512: at "SYS.UTL_FILE", line 157 ORA-06512: at line 10Received on Tue Aug 22 2000 - 07:44:06 CDT
![]() |
![]() |