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!

Forms6i - dynamic order by clause

adnanBIHNov 4 2009 — edited Nov 6 2009
Hello everybody. How do I overcome next problem ?
I created procedure:
PROCEDURE GetAnalit_From_Old_IO IS
CURSOR Fill IS
SELECT distinct col1, col2
FROM table a
WHERE col1>100
ORDER BY decode(:GLOBAL.order,null,col1,:GLOBAL.order) desc;
....
and defined global variable on when-new-form-instance trigger
:GLOBAL.order :='col3';

For some reason, this doesn't work - procedure doesn't ordering fetched data. I also tried ORDER BY decode(to_char(:GLOBAL.order),null,col1,to_char(:GLOBAL.order)), but it seems that's illegal.
Please help.
Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2009
Added on Nov 4 2009
12 comments
1,973 views