Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on DATETIME() fields
Message
 
 
À
02/12/2008 09:54:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01364954
Message ID:
01365118
Vues:
12
>>>I have two fields that are DateTime(). What is the best way to index them? I have tried:
>>>
>>>INDEX ON TRANSFORM(Field01) + TRANSFORM(Field02) ASCENDING TAG Temp
>>>
>>>But they don't seem to order correctly. I would also like the index to be as efficient as possible.
>>
>>Jay, I use dtos(datefield), because it puts it in order by year/month/date. The dtoc() gets it into a string but the order may be a little strange because the year is last.
>
>DTOC() is actually dependent on the current SET DATE setting, so it's a very risky choice for indexes. For a date field, as you say, DTOS() is the way to go. For datetime, as others said, TTOC(,1).
>
>Tamar

I see I'm now called "others" :)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform