Hi,
I used the following procedure to print out the locatin directory and file name without no result. It seems that the output of DBMS_LOB.FILEGETNAME is not a char format:
------------------------------------
1.
create table lobtab (
lob_id number(2),
lob_file BFILE)
/
2.
create directory lobdir as '/home/oracle/lob_dir'
/
3.
insert into lobtab
values (1, BFILENAME('LOBDIR', 'ShowLetter.pdf'))
/
4.
Procedure to find the name fo the directory and the file name:
create or replace procedure getNameBfile is
Dir_Name varchar2(30);
File_Name varchar2(30);
Lob_Loc BFILE;
begin
select LOB_FILE into Lob_Loc from LOBTAB where LOB_ID=1 ;
DBMS_LOB.FILEGETNAME(Lob_Loc, Dir_Name, File_Name);
end getNameBfile;
/
error message:
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "ZITEC.GETNAMEBFILE", line 6
ORA-06512: at line 1
Bookmarks