Merged Tables [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation
HP ALLBASE/BRW Reference Manual
Merged Tables
By merging tables, one source table is appended to another to form a new
table containing all the information from both tables.
To merge tables
1. On the Define Table screen, type the name for a new table in the
Table field.
2. Type M in the Type field (for merge).
3. In the Source Table fields, type the names of the source tables
from which the data for the new table is to be extracted. Specify
owner_name.table_name for each HP ALLBASE/SQL table.
4. In the Location fields, type the path to each source table.
5. Type any applicable passwords in the Password fields.
6. Choose Add Table.
Example: Merge
The following example merges the source table CUSTOMERS with the source
table INVOICES to produce the result table CUST-INVOICES. To see the
difference between a join and a merge, look at the diagram of the join
(shown earlier in this chapter under the "Joining Tables" section) and
compare it to the diagram of a merge (shown below).
In this example, the CUSTOMERS source table does not contain the items
INVOICE-NO and AMOUNT which appear in the merged table. Records coming
(projected) from this source table will contain NO_VALUEs for these items
in the merged table. Likewise, items CITY, NAME, and so on, appear only
in source table CUSTOMERS and will be set to NO_VALUE in records
projected from source table INVOICES.
Note that records are not related when tables are merged. Thus customer
Boot Inc, (CUSTOMER-NO C2), has more than one record in the result table.
The following section of the Define Table screen shows how the above
source tables are merged:
NOTE You cannot specify calculated items or relation conditions in a
merged table. To use a calculated item in a report with a merged
table, first create a joined table with the calculated item and
then merge it with the other source tables.
MPE/iX 5.0 Documentation