Select Records
Type comparisons, press Enter. Specify OR to start each new group.
Tests: EQ, NE, LE, GE, LT, GT, RANGE, LIST, LIKE, IS, ISNOT...
AND/OR Field Test Value (Field, Number, or ’Characters’)
STATE EQ ’LA’
____ ______________ _____ ______________________________
____ ______________ _____ ______________________________
____ ______________ _____ ______________________________
____ ______________ _____ ______________________________
Bottom
Field Text Len Dec
LASTNAME Last name 15
FIRSTNAME First name 10
ADDRESS1 Address line 1 20
ADDRESS2 Address line 2 20
CITY City 15
More...
F3=Exit F5=Report F9=Insert F11=Display names only
F12=Cancel F13=Layout F20=Reorganize F24=More keys
This tells Query for iSeries to test the field named STATE in each record for the value LA. Only records
with that value will be included in your report. (If you are using a unique weight system sort sequence
table or *HEX, make sure you type it as ’LA’ because the apostrophes tell the program that LA is
what the field contains and not the field name. You must also type this value in all uppercase letters
because that is the way it is specified in the field. If you have any doubt about the case of the data in
the database, you should use a shared weight table.)
8. Press F5 (Report) to run the query and show the report. F5 lets you see the effect your query
changes have on the report before you actually save those changes.
The report appears listing only customers in Louisiana (only the left portion of the report is shown on
the following display):
Display Report
Report width.....: 117
Position to line ..... ______ Shift to column ...... _____
Line ....+....1....+....2....+....3....+....4....+....5....+....6....+....7...
LASTNAME FIRSTNAME ADDRESS1 ADDRESS2
000001 SEDGEWICK LILLIAN 200 PARK LANE
000002 SEDGEWICK LEONA 21ST CANNERY ROW APT 43
000003 BARKER RICK 1432 LE GRAND BLVD
****** ******** End of Report ********
Bottom
F3=Exit F12=Cancel F19=Left F20=Right F21=Split F22=Width 80
9. Press F20 to display the right portion of the report.
Appendix B. Practice exercise for Query for iSeries query 213