PRB: "Operator/Operand Type Mismatch" When Indexing FieldsLast reviewed: June 27, 1995Article ID: Q94347 |
The information in this article applies to:
SYMPTOMSThe INDEX ON command returns an "Operator/operand type mismatch" error message when concatenating a character field with a logical field as in the following example
INDEX ON <NAME>+<LOG> TO NAMELOG,where <NAME> is a character field and <LOG> is a logical field.
CAUSEThese fields are not of the same data type; therefore, a conversion must be performed to make them compatible.
RESOLUTIONBecause there is no function that translates a character string into a logical string or vice versa, the following command is recommended
INDEX ON NAME+IIF(LOG=.T.,"T","F") TO NAMELOG,where the Immediate IIF statement returns a "T" if the logical expression is .T. and an "F" if it is not.
|
Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a errmsg err msg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |