Correct method:
On the Specify File Selections display, type the
CUSTOMER
file first, the
PURCHASE
file second, and the
ITEM
file third. Specify the file IDs
A
,
B
, and
C
, respectively. The join type is 2 (Matched records with primary
file). The join tests are:
A.NAME
EQ
B.NAME
B.ITEM
EQ
C.ITEM
Query performs the file join in two steps:
Step 1: Join the first two files,
A
and
B
.
Query joins the files in the order listed, starting with file
A
(
CUSTOMER
), and file
B
(
PURCHASE
). Query joins
each record in file
A
to any record in file
B
for which the
NAME
field in
A
is equal to the
NAME
field in
B
.
Because this query is join type 2 (primary matched), every record in the primary file
A
is included in the
join. If a record in file
A
(such as Martinez) has no match in
B
, Query joins it to a default record for file
B
,
which has blank values for fields. The result of step 1 in our example is a file called
AB
. (Note that
AB
is a
working file used to build the joined file that you want in your report. You cannot see file
AB
.)
Step 2: Join file
AB
to file
C
.
Query joins each record in file
AB
to every record in
ITEM
file
C
for which
B.ITEM
equals
C.ITEM
. If a record
in
AB
(such as Martinez) has no match in file
C
, Query joins it to a default record for file
C
, which is also
blank. This completes the join operation. Each record in primary file
A
is represented one or more times in
the five records.
50
Query for iSeries Use V5R2
Содержание @server iSeries
Страница 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 2: ......
Страница 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 12: ...x Query for iSeries Use V5R2 ...
Страница 14: ...2 Query for iSeries Use V5R2 ...
Страница 18: ...Figure 3 Major Tasks on the Query Menu and the Work with Queries Display 6 Query for iSeries Use V5R2 ...
Страница 32: ...20 Query for iSeries Use V5R2 ...
Страница 38: ...26 Query for iSeries Use V5R2 ...
Страница 44: ...32 Query for iSeries Use V5R2 ...
Страница 116: ...104 Query for iSeries Use V5R2 ...
Страница 122: ...110 Query for iSeries Use V5R2 ...
Страница 146: ...134 Query for iSeries Use V5R2 ...
Страница 150: ...138 Query for iSeries Use V5R2 ...
Страница 174: ...162 Query for iSeries Use V5R2 ...
Страница 178: ...166 Query for iSeries Use V5R2 ...
Страница 196: ...184 Query for iSeries Use V5R2 ...
Страница 198: ...186 Query for iSeries Use V5R2 ...
Страница 204: ...192 Query for iSeries Use V5R2 ...
Страница 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Страница 206: ...194 Query for iSeries Use V5R2 ...
Страница 210: ...198 Query for iSeries Use V5R2 ...
Страница 242: ...230 Query for iSeries Use V5R2 ...
Страница 256: ...244 Query for iSeries Use V5R2 ...
Страница 270: ...258 Query for iSeries Use V5R2 ...
Страница 272: ...260 Query for iSeries Use V5R2 ...
Страница 292: ...280 Query for iSeries Use V5R2 ...
Страница 293: ......
Страница 294: ... Printed in U S A SC41 5210 04 ...