Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically removing zero's
Message
De
13/06/2005 07:10:33
 
 
À
13/06/2005 06:51:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01022697
Message ID:
01022702
Vues:
10
>>I have a number field which is padded with zero's. For example:
>>
>>0000012345
>>000013456
>>
>>How can I programmatically remove the zero's??
>>
>>Many Thanks
>
>Have a look at the STRTRAN command:
>
>
>STRTRAN("000013456", "0", "")
>
>
>Kev

Huh? STRTRAN("0000134000056", "0", "") would give '123456' where you for sure would want '1234000056'. So, this solution is not worth the three stars. You better simply do something like

LTRIM(STR(VAL("000013456")))
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform