Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loading a text file into a table

John_KNov 7 2017 — edited Nov 27 2017

I have an application where I need to allow the user to upload a text file which contains multiple lines. I then want to read each line in that file into a separate row in a table - the table has one column "line data". I.e. if the user uploads a text file containing 20 lines, then I require 20 rows in my table. The "Data Loading" wizard of APEX seems to be over-complicated for what I need.

I found this (APEX to upload a text file and write into a table | Ittichai Chammavanijakul ) which details how to read the blob into separate lines in the able but it looks a bit inefficient in that it seems to read a character at a time from the blob, appending to a line, then when it find an EOL character it ends that line, and starts a new one (broadly speaking).

Does anyone have anything that is a little more efficient, or something a bit easier to achieve this? I.e. have things moved on since that was written, or is it pretty much the same thing is required?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2017
Added on Nov 7 2017
8 comments
1,145 views