Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing Question
Message
De
15/11/1999 18:18:24
 
 
À
15/11/1999 16:32:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00291273
Message ID:
00291328
Vues:
21
>>I have a ledger detail table that lets say has 500,000 records. I have one index on the date field and reference field.
>>
>>Isn't there a way to select records for a given date range from this table without regard to the reference, quickly?
>>
>>I am finding that unless the search expression matches the index expression exactly this could be a slow process. Isn't it possible some way to "jump into" the table for a search routine at a particular date and then "jump out" of the search routine after a specific date since date is the first field of the index tag?
>
>If your index tag is on DTOS(datefield)+reffield, then you should be able to do a select this way:
>
>SELECT * FROM yourtable WHERE DTOS(datefield)+reffield>="19991001" AND DTOS(datefield)<="19991231" INTO ...
>


Whoops, the second part of the WHERE should also have DTOS(datefield)+refield<="19991231".


>The left side of the "=" sign in the WHERE clause has to match the tag, but what's on the right side only has to match up to the point you're interested in.
>
>HTH
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform