>What do you mean?
>>
>>And if you project this into a VARCHAR() index search context ?.
I READ ON DOC:
Index keys based on Varbinary fields or expressions are padded with zeros from the right of the value to the maximum length of the field. For example, the values 0hAA, 0hAA00, and 0hAA000 have the same index key of 0hAA0000.
then PADR(binary,N) cannot to be used for search into a binary key index,
and within a SQL SELECT in general.
CREATE CURSOR BINARYINDEX (F1 Q(10),F2 Q(2))
INSERT INTO BINARYINDEX VALUES (0h01,0h01)
INSERT INTO BINARYINDEX VALUES (0h01,0h0100)
INDEX ON F1+F2 TAG btag
SELECT * FROM BINARYINDEX WHERE F1=PADR(0h01,3) AND F2=PADR(0h01,2)
SELECT * FROM BINARYINDEX WHERE F1==0h01 AND F2==0h0100
SELECT * FROM BINARYINDEX WHERE F1+F2==PADR(0h0101,12)
SELECT * FROM BINARYINDEX WHERE F1+F2==PADR(0h0101,12,0h00)
With implicit left to right varbinary <=> varchar conversions
this can to be a trouble;
or is this the cause of VFPT choice for this pad() behaviour ?
A clarification would be useful.
Fabio