Upload Multiple files into table code

Oracle Application Express is a rapid development tool for Web applications on the Oracle database.
Post Reply
admin
Posts: 1994
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Upload Multiple files into table code

Post by admin »

create table erpstuff_files (name VARCHAR2(400), filename VARCHAR2(400), mime_type VARCHAR2(255), created_on date, blob_content blob);

declare
l_file_names apex_t_varchar2;
l_file apex_application_temp_files%rowtype;
begin
l_file_names := apex_string.split (
p_str => :P2_DOC,
p_sep => ':' );
for i in 1 .. l_file_names.count loop
select *
into l_file
from apex_application_temp_files
where name = l_file_names(i);

insert into erpstuff_files (name, filename , mime_type , created_on , blob_content )
values
(l_file.name, l_file.filename , l_file.mime_type , l_file.created_on , l_file.blob_content);
end loop;
end;
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests