Information générale
Catégorie:
Codage, syntaxe et commandes
Assuming that the ref# field is a numeric type (say n(10,0)) and the date field is of a date type, you could index on the following expression:
DTOS(datefield) + PADL(ref#,10,'0')
then just
SEEK DTOS(dateyourlookingfor)
and do whatever processin you like
WHILE datefield = dateyourlookingfor
>I have a ledger detail table that lets say has 500,000 records. I have one index on date and ref#.
>
>Isn't there a way to select records for a given date range from this table without regard to the ref# 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 tax?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement