Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing numeric precision
Message
 
 
À
19/01/2009 15:07:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01209894
Message ID:
01375224
Vues:
22
>
>My data tables is has a reference total field set up as Numeric(10,2). I need to calculate some child records (child.qty * child.price * child.markup), then compare that to a ref number stored in the parent header (I know, a bad practice, and I'm getting away from it soon).
>
>So the SQL select is returning a sum like 254.0321 and even when I use Cast on the result, it will not test out as equal to 254.03.
>
>llAuditPassed=Cast(csrAudit.nTestTotal as Numeric(10,2))=Parent.RefTotal will return .F.

The ROUND() maybe better choice in this case but you'll have to test that

llAuditPassed=ROUND(csrAudit.nTestTotal,2))=Parent.RefTotal will return .F.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform