Custom Data File Upload in Oracle APEX

No matter what the business is, there is always a common requirement to upload file data into a database table. In this article, we will learn how to upload a data file in Oracle APEX and verify how the data appears in the database table.

First, create a table:



CREATE TABLE xx_file_upload (
    file_upload_id NUMBER
        GENERATED BY DEFAULT ON NULL AS IDENTITY,
    name           VARCHAR2(100),
    dob            DATE,
    designation    VARCHAR2(100),
    location       VARCHAR2(100),
    salary         NUMBER,
    CONSTRAINT file_upload_id_pk PRIMARY KEY ( file_upload_id )







Next, create a data file with the sample data as shown below. Save the file with any name. I am naming it SampleFileUpload.csv.




The next step is to create an application and go to the Shared Components section.

Here we will create a Data Load Definition based on our sample file. Once the data load definition is created, we will be able to upload the file and load its data into the target table.


Follow the below steps


Create a new APEX application

  • Click on Create Application





Navigate to Shared Components

  • After the application is created, open it

  • Click on Shared Components






Create Data Load Definition

  • Click on Data Load Definitions

  • Create a new definition based on your CSV structure and target table by following below screenshots 












select the table name in the Data Load 



Upload the  sample  CSV File and click on Next

























































Comments

Popular posts from this blog

Sample HZ API's script to Create Contacts and Contact Points in Oracle

PO Creation API in EBS R12.2.X

OIC Tutorial Link