19.25 UPDATE_DATA_SOURCE Procedure

This procedure updates an existing data source which identifies a table or query from which you can source data values.

Syntax

APEX_DG_DATA_GEN.UPDATE_DATA_SOURCE (
    p_blueprint             IN VARCHAR2,
    p_name                  IN VARCHAR2,
    p_new_name              IN VARCHAR2 DEFAULT NULL,
    p_data_source_type      IN VARCHAR2,
    p_table                 IN VARCHAR2 DEFAULT NULL,
    p_preserve_case         IN VARCHAR2 DEFAULT 'N',
    p_sql_query             IN VARCHAR2 DEFAULT NULL,
    p_where_clause          IN VARCHAR2 DEFAULT NULL,
    p_inline_data           IN CLOB     DEFAULT NULL,
    p_order_by_column       IN VARCHAR2 DEFAULT NULL )

Parameters

Table 19-25 UPDATE_DATA_SOURCE Parameters

Parameter Description
p_blueprint Identifies the blueprint.
p_name Name of a data source. Name is upper cased and must be 26 characters or less.
p_new_name New name of a data source (rename). Name is upper cased and must be 26 characters or less.
p_data_source_type TABLE, SQL_QUERY.
p_table For source type = TABLE. Typically this matches p_name.
p_preserve_case Defaults to N which forces p_table_name to uppercase. If Y, perserves casing of p_table.
p_sql_query For p_data_source_type = SQL_QUERY.
p_where_clause For p_data_source_type = TABLE, this adds the where clause. Do not include "where" keyword (for example deptno <= 20).
p_inline_data Used for p_data_source_type = JSON_DATA.
p_order_by_column Not used.

Example

BEGIN
    apex_dg_data_gen.update_data_source(
                 p_blueprint           => 'Cars',
                 p_name                => 'apex_dg_builtin_cars',
                 p_data_source_type    => 'TABLE',
                 p_table               => 'apex_dg_builtin_cars');
END;