Note:
If you are sending queries between countries that use the comma for a decimal separator, put a
blank after each comma separating the offset and length in the SUBSTR function and between
numeric values in a list in the VALUE function. Press F17 to show which decimal separator to use
in the query (see “Displaying the format of constants in Query for iSeries” on page 17).
Date, time, timestamp constants as values in Query for iSeries
Date, time, or timestamp constants are the same as the constants used on the Define Result Fields
display. See “Date, time, and timestamp expressions in Query for iSeries” on page 66. You can see what is
allowed for OS/400 date and time formats and separators by pressing F17 (see “Displaying the format of
constants in Query for iSeries” on page 17).
Null values in Query for iSeries
Null is a valid value for all data types on record selection. IS and ISNOT are valid tests for the keyword
NULL.
Comparison tests in Query for iSeries
You can specify these tests in comparisons:
Test
Description
EQ
Equal. Use this test to determine if the contents of the field and the value are equal.
NE
Not equal. Use this test to determine if the contents of the field and the value are not equal.
GT
Greater than. Use this test to determine if the contents of the field is greater than the value.
LT
Less than. Use this test to determine if the contents of the field is less than the value.
GE
Greater than or equal. Use this test to determine if the contents of the field is greater than or equal
to the value.
LE
Less than or equal. Use this test to determine if the contents of the field is less than or equal to
the value.
RANGE
Range. Use this test to determine if the contents of the field is within a range that you have
specified for the value.
LIST
List. Use this test to determine if the contents of the field is equal to one of the values in a list.
NLIST
Not List. Use this test to determine if the contents of the field is not equal to any of the values in a
list.
LIKE
Like. Use this test to determine if the contents of the field has a pattern similar to the value.
NLIKE
Not Like. Use this test to determine if the contents of the field has a pattern that is not similar to
the value.
IS
Is. Use this test to determine if a field is null. The only valid value is NULL or null.
ISNOT
Is not. Use this test to determine if the contents of the field is not null.
Character fields and constants are compared character by character for all tests except LIKE, NLIKE, IS,
and ISNOT.
v
If two fields or a field and a constant being compared are not the same length, Query treats the shorter
field as if it has enough blanks at the end to make both fields the same length.
v
The collating sequence determines greater than and less than conditions (for GT, GE, LT, LE, and
RANGE comparisons). For more information on collating sequences, see Chapter 9, “Selecting a
collating sequence in Query for iSeries”.
Chapter 7. Selecting records in Query for iSeries
95
Summary of Contents for @server iSeries
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...