Progress
Programming
Handbook
Temporary Table Example
The following procedure creates a temporary table (temp–item) that stores the total inventory value (the sum of item.price * item.on–hand) for each item’s catalog page (item.cat–page). It builds a temp–item with two indexes: one that sorts the table in ascending order by catalog page and a second that sorts the table in descending order by inventory value.
This shows how you can use a temporary table to store a calculated result from the database, and efficiently report the same result according to different sorting and selection criteria:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |