declare C_SQL constant varchar2(400) := q'~select width ,height ,top ,left ,class ,text ,available ,spot_id ,rotate ,innerhtml from pdp_sheet_components where sheet_id = &P1_SHEET. order by seq_id~'; l_sql varchar2(4000); begin l_sql := replace(C_SQL, '&P1_SHEET.', :P1_SHEET); apex_collection.create_collection_from_query( p_collection_name => :G_COLLECTION ,p_query => l_sql ,p_truncate_if_exists => 'YES' ); end;