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!

ORDER BY clause in runtime

707796Jul 22 2009 — edited Jul 23 2009
Hi All,

I want to order my SELECT using "dynamic ORDER BY". I have a CURSOR (in my PL/SQL procedure) contains a select with ORDER BY clause. I have implemented two combobox in my form (the first contains the column name, the second contains ASC and DESC).I tried with the next:

1) Dynamic ORDER BY in CURSOR with combobox results. IT DOESN'T WORK.
2) Using a block property named "ORDER BY CLAUSE". Here I put, for example, :myBlock.comboColumnOrder. IT DOESN'T WORK.
3) Using a function: set_block_property(myBlock,order_by,:myBlock.comboColumnOrder) or set_block_property(myBlock,default_where,:myBlock.comboColumnOrder). IT DOESN'T WORK.
4) Using dynamic CURSOR: ORACLE FORMS give me an error that said: "...it can't to the CLIENT-SIDE".

I have thought my last solution, but it maybe cumbersome. I do a TEMPORARY TABLE, and my CURSOR insert in this TABLE, and then I'll fetch to my BLOCK.

Thanks a lot.

PS: My ORACLE Version is 10g.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2009
Added on Jul 22 2009
17 comments
3,539 views