>>>I have a "log" table with an index on Date Time. The index is working find, until I deleted some of the entries
>>>and packed the file. The index does not seem to work now. I restored the table and simply redinexed and
>>>the index is not working.
>>>
>>>Any ideas????
>>
>>Norm,
>>
>>What does "index is not working" mean?
>
>If I use the following commands
>
> workdate = sclhist.datetime
> count for sclhist.datetime = workdate
>
>The count returns zero. If I do the same thing with the "restored" table (before the reindex) the count returns 1277.
>I have checked and all 1277 of the data records are present.
I'm surpised it ever worked at all. DataTime fields actually store more precision than they display, so SEEKing values in them, or COUNTing for a specific value doesn't generally work. There are several workarounds, one of which is to convert the field with TTOC() and count using that:
workdate = TTOC(sclhist.datetime)
count for TTOC(sclhist.datetime) = workdate
Erik Moore
Clientelligence