简体   繁体   中英

Set Order By Clause Dynamically for Procedure based data block

Is it possible to set order by clause dynamically for procedure based data block?

I have tried adding a button and in When_Button_Pressed trigger I have used the below but did not work...

Set_Block_Property('XXFDF_DTL', Default_Where,v_where); 
Set_Block_Property('XXFDF_DTL',Order_By,'PAPERSTOCK');

Any inputs will be much appreciated.

Thanks

you could have a static sql and sort based on the value of the variable:

 select ... from ...
 order by decode(:val, 1, col1, 2, col2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM