>>>SYS(11) return a fixed lenght string C(7),
>>>
>>
>>Are you sure?
>>
>>
>>? LEN(SYS(11,'06/06/1998'))
>>? LEN(SYS(11,{}))
>>
>>
>>Thanks,
>>Aleksey.
>
>This wouldn't be such a big deal to us if SET ENGINEBEHAVIOR 70/80 actually switched the optimization behavior back to 7 or 8. In this case, however, it doesn't.
If you have an empty date the use of the index returns a wrong result:
SYS(3054, 11)
SET ANSI OFF
CLEAR
CREATE TABLE c:\testopt (trans_date D)
APPEND BLANK
test()
INDEX ON SYS(11,trans_date) TAG custhist
test()
PROCEDURE test
SELECT * ;
INTO ARRAY x;
FROM testopt;
WHERE SYS(11,trans_date) = "01"
? _tally