IBM ISERIES SC41-5210-04 User Manual

Page 59

Advertising
background image

You can obtain several different results from a file join when you use different combinations of join tests
and options on the Specify How to Join Files display.

Following are some examples of how you might use the three different types of joins. All of the examples
assume that

A.NAME EQ B.NAME was specified on the Specify How to Join Files display.

Example: Selecting matched records from all selected files in a Query for iSeries
query

Type a 1 if you want records selected from each file only if they have a match with at least one record in
each and every one of the other selected files. That is, for a record to be selected, all the files must have
a matching record as determined by the join specification(s). A match occurs when, for each file used in
the query, the contents of its fields selected for comparison match the test condition(s) given on the
Specify How to Join Files display. (This type, option 1, has no primary or secondary files; all files are
treated equally.)

In this example, if you join files

A and B using option 1 (Matched records), the query report contains the

following records. (The report fields and layout are not important here.)

Chapter 4. Specifying and selecting files for a Query for iSeries query

47

Advertising