14.3 LOAD_DATA Function Signature 1
This function loads file data and returns loading status information containing processed rows and error rows.
Syntax
APEX_DATA_LOADING.LOAD_DATA (
    p_application_id   IN NUMBER      DEFAULT apex_application.g_flow_id,
    p_static_id        IN VARCHAR2,
    p_data_to_load     IN BLOB,
    p_xlsx_sheet_name  IN VARCHAR2    DEFAULT NULL )
    RETURN t_data_load_result;Parameters
Table 14-2 LOAD_DATA Parameters
| Parameter | Description | 
|---|---|
| p_application_id | ID of the application which contains the data load definition. | 
| p_static_id | Static ID of the data loading definition to execute. | 
| p_data_to_load | BLOB file to be loaded. | 
| p_xlsx_sheet_name | For XLSX files, the worksheet to extract. | 
Example
This example fetches a file (uploaded with the PX_FILEBROWSE_ITEM) from the APEX_APPLICATION_TEMP_FILES table and executes the my-load-definition data loading definition.
                  
DECLARE
    l_file blob;
    l_load_result apex_data_loading.t_data_load_result;
BEGIN
    apex_session.create_session( 100, 1, 'ADMIN' );
    SELECT blob_content
      INTO l_file
      FROM apex_application_temp_files
    WHERE name = :PX_FILEBROWSE_ITEM;
    l_load_result := apex_data_loading.load_data (
                       p_static_id    => 'my-load-definition',
                       p_data_to_load => l_file );
    dbms_output.put_line( 'Processed ' || l_load_result.processed_rows || ' rows.');
END;Parent topic: APEX_DATA_LOADING