Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>Hi Rich,
>
>Thanks for the advice. Cust_ID is a character ("0008") not 8. What I wanted to do is to go directly to the records for Cust_ID="0008" and sum all the orderamount (as indexed on Cust_ID) and immediately stop summing the orderamount when it encounter the next record not equal to "0008" (Cust_ID). I wanted to completely avoid all those Cust_ID<>"0008".
>
>Since Sum .... for ... Cust_ID="0008" would still go though all of the records and would take some time somehow so does with using SQL thats why I thought of the seek and do while. I've used the "&" because the input would be coming from the user of his/her choice of Cust_ID. (Dont know if this is a good idea or not).
>
It's not! If you have a character variable lcVar and it contains "00008" when you ?&lcVar. you will get the numeric value 8. Not only that, it's much slower to use &.
Doing it with cust_id = m.lcVar will work much faster so long as the cust_id in the table matches the data type of the m.lcVar.
Précédent
Suivant
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