Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What may be a problem?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
What may be a problem?
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01522691
Message ID:
01522691
Vues:
175
Hi everybody,

I have a strange problem and I'm wondering what I can do to fix it?

As a result of my calculations I receive a cursor with 2 records.
One has 0 as a quantity and 0 as a CostOfGoodsOnHand
and the second record has -1 as quantity and -4.75 as CostOfGoodsOnHand.

I then use this formula

select iif(sum(QuantityOnHand) = 0, 0, sum(CostOfGoodsOnHand)*1.00/sum(QuantityOnHand)) as unit_cost from csr_AvgCost into cursor csrLastCost

and I get 5 as a result instead of 4.75

Do you know what may be a problem here?

Thanks in advance.

UPDATE. I figured it out.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform