[SQL*FORMS] A multi-table block?

From: Frampton Steve R <3srf_at_qlink.queensu.ca>
Date: 1996/10/29
Message-ID: <555gv4$po0_at_knot.queensu.ca>#1/1


I am creating an SQL*Forms 3.0 application, which consists of 3 blocks. In my first block (MASTER), I am displaying the employee information. The second block would display the absence records that belong to the current employee. The third block is inconsequential at this time. :-)

The problem I am having is, the absence records are contained in two tables -- one is for absences which occurred in the current fiscal year, and the other is for those which occurred in previous years. I would like to combine the information and display it in this block.

The union would do the trick:

select bla bla bla
from current_table
where conditions
union all

select bla bla bla
from history_table
where conditions

This strategy seems to work nicely for SQL*Plus reports. But to do this in SQL*Forms, would I first need to create a view? I'd like to avoid that if possible...but don't know how I would specify a base table and etc. in the block definition.

If a view is the only way this can be accomplished, does it sound reasonable to create/replace the view upon KEY-STARTUP and drop it upon KEY-EXIT?

Thanks in advance.

---------------< LINUX: The choice of a GNU generation. >---------------

Steve Frampton                           http://qlink.queensu.ca/~3srf
Work: <frampton_at_mail.flarc.edu.on.ca> School: <3srf_at_qlink.queensu.ca> --< NOTICE! I do not accept unsolicited commercial e-mail messages! >-- Received on Tue Oct 29 1996 - 00:00:00 CET

Original text of this message