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!

Using PL/SQL to insert a .csv file into a table using GET_COLUMNS

I am trying to use PL/SQL to upload a .csv file into a table. The .csv file will always have the same columns but not might always be in the same order.

I've tried looking into the DISCOVER AND GET_COLUMNS functions but cannot figure out how to combine everything into a working PL/SQL code. I also have other values that I need to insert into the table that are not in the .csv file, which I need to hardcode manually within the PL/SQL code.

I'd like to be able to upload the .csv to the apex_application_temp_files (which I can already do), get the column names of the .csv and then parse the .csv and insert it into a DB.

Are there any working examples of this?

Comments
Post Details
Added on Oct 23 2024
6 comments
1,017 views