Skip to Main Content

Oracle Forms

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!

How to set order siblings by clause in a block

639482Sep 17 2008 — edited Sep 18 2008
Hi,

My block is based on a hierarchical query such as the following.

select ename, sys_connect_by_path( ename, '/' ) path, level
from scott.emp
start with mgr is null
connect by prior empno = mgr


The requirement is to sort the result based on some column, say by ename. If I just use "order by ename", this will mess up the hierarchy result. So I need to use "order siblings by ename".

The problem is Oracle Forms automatically insert "Order By" clause which results with the following query being fired by the form engine.
select ename
from scott.emp
start with mgr is null
connect by prior empno = mgr
order by order siblings by ename;

This is not a correct syntax, so I am getting ORA-00936: missing expression.

I have tried dynamically setting the order by clause by using set_block_property(block_name, ORDER_BY, order_clause), but the same result happens, i.e. order by is inserted automatically prior to my order_clause.

My question is how to tell the Form so that it does not insert the "Order By" automatically?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2008
Added on Sep 17 2008
5 comments
1,917 views