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!

Default order by clause in forms

Sandy310May 21 2009 — edited May 27 2009
Hi,

My form has a data block which has items based on database table and non-database
table. My question here is - where do I use order by clause so that I can have
client number item which is database column in Ascending order. If I put
Order By Client in Data block property palette it is taking too long in
executing which obviously I don't want, is there any other way to do it.

Giving more background to it earlier I used to get all clients in Asc order but yesterday new client
has been added and now I see that particular client on top irrespective of its number being 40.
I was wondering from where Oracle forms takes its default Order By clause.

My second question is my query is running little slow is there any way to tune it.here is part of it

SELECT count(*)
INTO :ORDER_STATUS.EXPEDITE
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND (nvl(o.priority,'1') = '2'
OR stm.surcharge_amount <> 0)
AND o.client = :ORDER_STATUS.CLIENT_NUMBER
GROUP BY o.client;

I really appreciate your help and time.

Thanks
SANDY

Edited by: sandy162 on May 21, 2009 2:12 PM
This post has been answered by user346369 on May 22 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2009
Added on May 21 2009
10 comments
2,233 views