Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select is rounding my numbers
Message
De
02/06/2002 13:05:44
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
02/06/2002 12:57:57
Hisham Serry
Al-Bahar United Company
Kuwait, Kuwait
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00663877
Message ID:
00663879
Vues:
11
>Hi all,
>
>after I success in a defecult select statement I found that some numbers are getting rounded, while I do need the exact result without rounding it I have a three (3) decimal places in my value but why it is getting rounded I do not know any idea ?

Fox is measuring the size of the columns to create based on the first record(s) it encounters, so if it gets something that doesn't have decimals (or has them but they are zero), it doesn't include them. The old trick which worked as early as FP2.0 was to add a neatly formatted zero, with sufficient number of digits:
select nMyDecimalField+0000000000.000 as nMyField ...
The same goes for trimmed strings - you should use pad*() functions to give the resulting string the width you want.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform