Re: [SQL*FORMS] A multi-table block?

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1996/10/30
Message-ID: <BR6p6TAnr0dyEw4z_at_jimsmith.demon.co.uk>#1/1


In article <555gv4$po0_at_knot.queensu.ca>, Frampton Steve R <3srf_at_qlink.queensu.ca> writes
>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?
A view is the only way I know of including two tables in a block. It hsa the disadvantage that you won't be able to update it.
>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.
You could try making it two blocks and using lots of triggers to make it look like a single block. I have done this kind of thing in the past and it really is a lot of effort. It is better to talk or bribe your users into accepting an alternative layout.
>
>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?
>
There no need to create the view every time. There is no overhead in the existence of a view and programs that don't need to use it can just ignore it.

Besides, you can't easily create views in PL/SQL. (You need to use the DBMS_SQL package)

>Thanks in advance.
>

As a side issue. What is the support situation for Forms 3? I know Oracle intended to withdraw support at the end of last year, but postponed it after user pressure, What is the new date?

Please use comp.databases.oracle.tools for forms related topics. comp.databases.oracle is being phased out.

-- 
Jim Smith
Received on Wed Oct 30 1996 - 00:00:00 CET

Original text of this message