Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to strip / delete leading zeros ...
Message
 
 
À
15/10/2009 16:05:52
Harold Leggett
Information Services Group
Louisville, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01429527
Message ID:
01429546
Vues:
53
>Sunofagun ...
>
>SET DECIMALS TO 17
>
>... did the trick.
>
>I am stunned, amazed ... pleased to the max.
>
>Thank you.
>
>Best,
>
>Harold ...

It should not matter - something else is going on.

I ran this test
LOCAL lnI, lcDecimals
FOR lnI = 1 TO 18
lcDecimals = STR(lnI-1)
SET DECIMALS TO &lcDecimals
CREATE CURSOR crsTest (CharField C(6), NumField N(10))
INSERT INTO crsTest (CharField) VALUES ("2098")
INSERT INTO crsTest (CharField) VALUES ("0092")
INSERT INTO crsTest (CharField) VALUES ("3100")
INSERT INTO crsTest (CharField) VALUES ("2101")
INSERT INTO crsTest (CharField) VALUES ("2435")

SCAN
   REPLACE NumField WITH VAL(CharField)
ENDSCAN
BROWSE NORMAL
next
and it worked for any setting of SET DECIMALS.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform