Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
[Figure: Using a query specification to add data (when column layout does not correspond)]
Besides fetching specific values from a table, query specifications can also be used to join and manipulate multiple
tables. Query specifications can also be used to group tables and total their values. An example of this follows. For
detailed information, see Chapter 5 "Joining Multiple tables and Manipulating Data" and 6.1 "Grouping tables and
Manipulating Data". Do not be concerned too much about the details of Figure: Adding data using a complex query
specification, just try to understand in general terms what happens when a query specification is used.
Example 3:
In this example, PRODNO for the ORDER table and the total of ORDERQTY for each PRODNO is
added to the CASSETTE table. The data to be added is specified as only for orders by more than one
CUSTOMER. In addition, "D", which stands for CASSETTE DECK, is set in column TYPE, and "3",
which stands for orders by more than one CUSTOMER, is set in host variable PART.
27