我的存储过程是这样写的,对这个也是比较陌生,在执行到dbms_lob.fileexists一句就卡死了,自己不懂,想问问各位大侠,这是怎么回事?
create or replace procedure file_dir(
pi_filename in varchar2)authid current_user isbook_file_loc bfile:=null;
book_file_exists boolean:=false;
var_file_dir varchar2(40):='D:\app\';
var_file_name varchar2(40):=‘log.txt';
var_string varchar2(2);begin
book_file_loc:=bfilename(var_file_dir,var_file_name);
book_file_exists := dbms_lob.fileexists(book_file_loc)=1 ;
if book_file_exists = true then
var_string:='1';
else
var_string:='0';
end if;
create or replace procedure file_dir(
pi_filename in varchar2)authid current_user isbook_file_loc bfile:=null;
book_file_exists boolean:=false;
var_file_dir varchar2(40):='D:\app\';
var_file_name varchar2(40):=‘log.txt';
var_string varchar2(2);begin
book_file_loc:=bfilename(var_file_dir,var_file_name);
book_file_exists := dbms_lob.fileexists(book_file_loc)=1 ;
if book_file_exists = true then
var_string:='1';
else
var_string:='0';
end if;
bfilename('var_file_dir','log%'),但是就跳到var_string:='0',即文件不存在
当为
bfilename('var_file_dir','log_file_201204.txt'),就可以找到
想请问大家,怎样匹配文件