Re: Oracle FORMS Query
Date: Tue, 13 Apr 1993 17:50:02 GMT
Message-ID: <C5Fo7F.6M7_at_news.rich.bnr.ca>
In article <rana.734513338_at_mardo>, rana_at_cs.uwa.oz.au (Ranadeva Peries) writes:
|> FORMS 3 QUERY.
|>
|> Dear Oracle experts,
|>
|> I am posting the following query for a friend who does not
|> have internet access. If you can help, please send your
|> replies to the following address.
|>
|> rana_at_cs.uwa.edu.au
|>
|> Thanks in advance for your help.
|>
|> ----------------------------------------------------------------
|> My database contains two tables. They are as follows:
|>
|> Table 1: LINES TABLE 2: TREATMENTS
|>
|> Fields: REF_NO CHAR 2 Fields: TCODE CHAR 2
|> COLLECTOR CHAR 15 TNAME CHAR 15
|> TCODE CHAR 2
|>
|> I would like to build a FORM with a multi line block to display
|> the contents of the LINES table. However, I would like the
|> TNAME field corresponding to the TCODE in LINES to appear next to it.
|>
|> I expect the multi-line block to look like this.
|>
|> REF_NO COLLECTOR TCODE TNAME
|>
|>
|> If I define LINES as the BASE table for the block, how can I
|> get the TNAME field to be retrieved from the TREATMENTS table.
|>
|> Do I need to define a second block for the TREATMENTS table. I
|> would like to perform an 'EXECUTE_QUERY' from a trigger to
|> display the records.
|>
|> --------------------------------------------------------------------
define default block with base table LINES
add field to this block as non-data base field
Then define post-query select tname into :block_name.non-data base field name
from treatements
where tcode = :block_name.tcode
the post-query trigger will fire after each row is returned.
I usually use the screen painter to select, cut, and paste, so that the fields are on one line (one may change the definitions under fields of the X and Y cooridinates also) and then modify the block to show multiple lines on that page
with the default block definitions all keys defined in your oraterm.r or whichever keymapping are available... use your trigger definitions to manipulate the key-commands to do more than what is standard.
I started with the default blocks and built up triggers etc... as I learned sqlforms.
John Hawkins
nvjhh01_at_nt.com
/** My opinions are mine, not nt.com etc.... **/
-- John Hawkins || #define disclaimer(X) fprintf(stderr," X\n"); Northern Telecom || Voice: 615-734-4468 /* Able was I, ere */ 200 Athens Way || Fax: 615-734-4771 /* I saw Elba */ Nashville TN 37728 || Internet: nvjhh01_at_NT.COM /* Who? */Received on Tue Apr 13 1993 - 19:50:02 CEST