Hi Cesar,
For using indexes with BINTOC() exist the one rules:
- Index must has collate MACHINE
MartinJ
>Is there a trick to use SET KEY command when the index expression contains BINTOC() ?
>
>I've created an index based on 2 integer fields:
>BINTOC(INT1) + BINTOC(INT2)
>
>I want to use the SET KEY to see only some fields that match the 1st value
>
>I'm trying this way with no success:
>
>
SET EXACT ON
>SET ORDER TO indicenovo
>SET KEY TO BINTOC(lnValue)
>
>where lnValue is an Integer
>
>But if I create an index using PADL instead of BINTOC it works perfectly:
>PADL(int1,6,"0") + PADL(int2,6,"0")
>
>What am I doing wrong ? I'd prefer to use BINTOC() because this way I can reduce the index file size...
>
>TIA
>
>Cesar