Re: Forms3.0 Order by

From: Michael Nolan <nolan_at_helios.unl.edu>
Date: 17 Nov 1993 18:11:25 GMT
Message-ID: <2cdpgd$o9n_at_crcnis1.unl.edu>


biverson_at_empros.com (Becky Iverson) writes:

>I have been looking for ways to create a dynamic order by statement
>in a block in forms and so far have had no luck. I have tried
>substitution variables, and global variables.

One way to do this would be to add it in as part of a pre-query trigger. (I'm assuming that it is queried records you're interested in ordering.)

The easiest way to do this is to take a queryable field that won't actually be used and use the '#' to add your own SQL to the query, and put the ORDER BY clause there. If you build the dynamic order by variable in a local PL/SQL variable, then you just copy it to the queryable field.

For example

declare
x char(256);
begin
x := '#) ORDER BY '
[more PL/SQL statements to add dynamic order by clause go here] copy (x,'block.field';
end;

This technique is lifted pretty much from support bulletin 102101.486.

---
Michael Nolan, Sysop for the DBMS RoundTable on GEnie
nolan_at_notes.tssi.com, dbms_at_genie.geis.com
(posted from nolan_at_helios.unl.edu)
Received on Wed Nov 17 1993 - 19:11:25 CET

Original text of this message