Tags

,

Database In Action

i.e.

DECLARE
f_lob BFILE;
b_lob BLOB;
BEGIN
INSERT INTO owner.table_name
(col1, col2, col3, col4, col5,
col6, col7
)
VALUES (‘xxx’, ‘xxx’, 1, ‘xxx’, ‘xxx’,
EMPTY_BLOB (), ‘W’
)
RETURN DOC
INTO b_lob;

f_lob := BFILENAME (‘DATA_PUMP_DIR’, ‘1_v1.docx’);
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);
COMMIT;
END;
/

View original post

Advertisements