Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate max() failed
Message
De
19/08/1999 14:49:42
 
 
À
19/08/1999 13:08:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00255384
Message ID:
00255454
Vues:
11
>I used this:
>select mytable
>set order to mycode
>seek (mycode)
>myvar = ""
>Calculate max(myfield) to myvar rest while code = mycode for myFilterCondition
>
>It works fine ONLY if there are matching records to myFilterCondition.
>
>If no records within the scope match myFilterCondition, myvar returns a value from myfield on the next record out of the scope (this is, where code # mycode).
>
>I expected myvar to be blank when no matching records, even if it wasn´t blank before the calculation and much more if it was blanked as shown upthere.
>
>Is this a bug of vfp?. Does this work as I expected in other versions of Vfp? (I´m running VFP 6.0 version number 06.00.8167.00)

Have you tried something like:
MyVar = 0
SELECT MyTable
CALCULATE MAX( MyField ) TO MyVar FOR ( code = MyCode AND MyFilterCondition )
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform