Здравствуйте, JMaxus, Вы писали:
JM>Сделал точно, как написано. Странно, процедура выдала ошибку
JM>ORA-22285: non-existent directory or file for FILEEXISTS operation
SQL> host mkdir c:\blahblah
SQL> host copy nul c:\blahblah\test.txt
SQL> create directory test_blahblah as 'c:\blahblah';
Directory created.
SQL> create table test_bfile (bf bfile);
Table created.
SQL> insert into test_bfile values(bfilename('TEST_BLAHBLAH', 'test.txt'));
1 row created.
SQL> declare
2 lob_loc bfile;
3 begin
4 select bf into lob_loc from test_bfile;
5 if dbms_lob.fileexists(lob_loc) = 1 then
6 dbms_output.put_line('File exists');
7 else
8 dbms_output.put_line('File does not exist');
9 end if;
10 end;
11 /
File exists
PL/SQL procedure successfully completed.
SQL> spool off