Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with DATETIME field in index
Message
De
09/01/2000 22:00:36
 
 
À
09/01/2000 20:02:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00315277
Message ID:
00315332
Vues:
22
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform