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)
;