insert into emp1(empno,empname,resume)
values ( 1001, 'BILLGATES',empty_blob() )
return resume into b_lob;
-- resume is the field name in my table which has BLOB data type
f_lob := bfilename( 'MY_FILES', 'Purchase.doc' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile
( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
Using PL/SQL, you can retrieve LOBs/BLOBs using the routines in the DBMS_LOB package, ** BUT ** you must want to SHOW the contents, I believe. PL/SQL, being a "batch", "server-side" language, donīt know anything about .doc format, so you MUST use other tools/language (probably in client side) to do it : Forms is capable, Vb too, Delphi, C and some others.
Oracle sells some add-ons (intermedia) to do it inside the database, it is another option, or maybe java - the point is , with STANDARD PL/SQL & simple clients (like sql*plus), you CANīT DO IT.
Bookmarks