Kbase 4057: S/E 584 USE-INDEX on FIND within PRESELECT Bug 90-12-19-003
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
S/E 584 USE-INDEX on FIND within PRESELECT Bug 90-12-19-003
Unix SCO 386,,,920228-46247,hjbgetting error 584 a use-index cannot be used on a FIND within a
PRESELECT on same file
Example:
FIND FIRST postrans WHERE postrans.gl-act-no = chaccounts.gl-act-no
USE-INDEX p7 NO-LOCK NO-ERROR.
See Bug #90-12-19-003; fixed in version 6.2H, 6.2L, 7.0 and above.
Customer wanted to force the selection of the first general ledger
entry on a given account, where FIRST is determined by the DATE field
which is the second component in the index; that's why he was using
the USE-INDEX qualifier.
You can force the compiler to select the index you want by providing
an ACTIVE, but dummy, record selection on the next component (field)
in the index.
Change the above example to:
FIND FIRST postrans WHERE postrans.gl-act-no = chaccounts.gl-act-no
AND postrans.trans-date < ? NO-LOCK NO-ERROR.
Since the date, if populated at all, must sort LESS THAN UNKNOWN,
by making a reference to the field which is the second component in
the "p7" index, the compiler will, without use of the offending
'USE-INDEX' expression, choose the index that the developer wants.
Progress Software Technical Support Note # 4057