Re: Oracle Forms, Order a table by a non database item

From: M Claver <m_at_mclaver.myweb.nl>
Date: Thu, 26 Jul 2001 21:27:26 +0200
Message-ID: <9jpqap$3ob$1_at_cyan.nl.gxn.net>


Create a database package with a function that returns the same value as your post query trigger. Then place the function in the order by clause of your block.

Order by clause: package_name.function(input).

Make sure you use the Pragma restrict_reference clause on the package specification on the function.

Create or replace package bla as
function orderby(p_input) return number; pragma restrict_references(orderby,wnps,wnds); end;
create or replace package body bla as
function orderby(p_input) return number; begin

return();
end;
end;
nick <nickymartin22_at_hotmail.com> schreef in berichtnieuws 3acf3c8.0107250415.6161613f_at_posting.google.com...
> I"m using two tables, the first table contains all the information and
> a number which is the primary key in another table. The number in the
> first table is being used to get the actual name of the company in the
> other table. I can get the names I'm after by creating a simple
> display item and feeding the data to it through a post_Query trigger.
> What I can't do is order the table in forms based on that display
> item. In the past when I've wanted to order a table I've just used
> the order_by property at the block level, but that won't work since
> the item isn't an actual database column.
>
> Thanks,
Received on Thu Jul 26 2001 - 21:27:26 CEST

Original text of this message