>I've a strange behavior with an index:
>
>
>The index is: ALLTRIM(CharField) + DTOC(DateField)
>
>When I "append from othertable" with the same structure, the seek function does not find the record, if I issue REINDEX command, Seek function works fine!
>
>Thank's in advance,
>Nuno Pedro
You should NEVER use an index with a varying keylength. Better index on:
CharField + dtos(DateField), or, if you insist on using ALLTRIM(), on something like:
padr(alltrim(CharField) + dtos(DateField), 30).
See also the help for dtos() - it is more appropriate, for indexing, than dtoc(). (Or use dtoc() with the second parameter - 'tis the same thing.)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)