Re: sort by non_base table item

From: Lasse Hohenthal <lhohenth_at_kolumbus.fi>
Date: Sun, 25 Oct 1998 09:47:50 +0200
Message-ID: <3632D7A6.5A02_at_kolumbus.fi>


Lee Yiao Chung wrote:
>
> Dear all,
>
> I had a base table block, but one of the items is non_base table item,
> how can I use the non_base item to sort at query mode?
>
> Thanks a lot...
>
> PS. plesae reply to my mail address.
Hi

One way of doing it is to use stored packages. Make function that fetches value of the non-database field and sort using that value.
(e.g. blocks order by clause something like:

	costomer_handling.costomer_name(order.customer_id) asc,
	order.order_date desc;

when you want have orders sorted by costumer name and order date. In package you have to use pragmas, usually something like

pragma restrict_references(costomer_name,wnds,rnps,wnps);

Lasse Hohenthal
email lasse.hohenthal_at_kolumbus.fi
  tai lasse.hohenthal_at_cfsitp.com Received on Sun Oct 25 1998 - 08:47:50 CET

Original text of this message