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!

Create collection from query with bind variable

partlycloudyNov 2 2011 — edited Nov 2 2011
Apex 4.0.2

Per Joel 4467612 the apex_collection.create_collection_from_query_b supports queries containing bind variable references (:P1_X) but I am not sure how to use this feature, the documentation doesn't have an example, just the API signature for the overloaded version has changed.

If the query contains 2 bind variable references to session state (:P1_X and :P1_Y), can someone please show an example of what to pass in for the p_names and p_values parameters to the API?

Thanks
procedure create_collection_from_query_b(
    --
    -- Create a named collection from the supplied query using bulk operations.  The query will
    -- be parsed as the application owner.  If a collection exists with the same name for the current
    -- user in the same session for the current Flow ID, an application error will be raised.
    --
    -- This procedure uses bulk dynamic SQL to perform the fetch and insert operations into the named
    -- collection.  Two limitations are imposed by this procedure:
    --
    --   1) The MD5 checksum for the member data will not be computed
    --   2) No column value in query p_query can exceed 2,000 bytes
    --
    --
    -- Arguments:
    --     p_collection_name   =  Name of collection.  Maximum length can be
    --                            255 bytes.  Note that collection_names are case-insensitive,
    --                            as the collection name will be converted to upper case
    --     p_query             =  Query to be executed which will populate the members of the
    --                            collection.  If p_query is numeric, it is assumed to be
    --                            a DBMS_SQL cursor.
    -- example(s):
    --     l_query := 'select make, model, caliber from firearms';
    --     apex_collection.create_collection_from_query_b( p_collection_name => 'Firearm', p_query => l_query );
    --
    p_collection_name in varchar2,
    p_query           in varchar2,
    p_names           in wwv_flow_global.vc_arr2,
    p_values          in wwv_flow_global.vc_arr2,
    p_max_row_count   in number default null)
    ;
This post has been answered by fac586 on Nov 2 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2011
Added on Nov 2 2011
2 comments
3,324 views