このプロシージャは、ORDER BYコレクションにORDER BY式を追加します。
構文
procedure add_order_by ( p_order_bys in out nocopy t_order_bys, p_column_name in t_column_name, p_lov in t_lov, p_direction in t_order_direction default c_order_asc, p_order_nulls in t_order_nulls default null );-- c_order_nulls_last if ascending, c_order_nulls_first when descending procedure add_order_by ( p_order_bys in out nocopy t_order_bys, p_position in pls_integer, p_direction in t_order_direction default c_order_asc, p_order_nulls in t_order_nulls default null );-- c_order_nulls_last if ascending, c_order_nulls_first when descending
パラメータ
表13-3 ADD_ORDER_BYプロシージャのパラメータ
パラメータ | 説明 |
---|---|
|
ORDER BYコレクション。 |
|
指定されたデータ・ソースの列名または別名を参照します。 |
|
列を昇順または降順でソートするかどうかを定義します。有効な値は |
|
NULLデータを最下位または最上位にソートするかどうかを定義します。有効な値は
NULL 、c_order_nulls_first およびc_order_nulls_last です。NULL は、ソート方向に基づいた自動処理に使用します。 c_order_asc -> c_order_nulls_last c_order_desc -> c_order_nulls_first |
例
declare l_order_bys apex_exec.t_order_bys; l_context apex_exec.t_context; begin apex_exec.add_order_by( p_order_bys => l_order_bys, p_column_name => 'ENAME', p_direction => apex_exec.c_order_asc ); l_context := apex_exec.open_web_source_query( p_module_static_id => '{web source module static ID}', p_order_bys => l_order_bys, p_max_rows => 1000 ); while apex_exec.next_row( l_context ) loop -- process rows here ... end loop; apex_exec.close( l_context ); exception when others then apex_exec.close( l_context ); raise; end;
親トピック: APEX_EXEC