You can compare one field with another in a record. A good example of this is finding all records with WITHDRAWALS GT BALANCE.
Note: Field to field comparisons involve scanning records. Always try to have other (keyed) criteria ANDed with these criteria.
When performing field to field comparisons on numeric, float or date fields, an adjustment amount (taken as a number of days, for date format data), can be specified. For example, the following statement matches all records where the field DATECLOSED was greater than the field DATEOPEN plus 10 days:
DATECLOSED GT DATEOPENED PLUS 10
The amount must be an integer; floating point numbers are not supported.
When performing nested scans (sub-selects), you can perform a field-to-field comparison when one of the fields is the current value in an outer scan. This is called a correlated query.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |