Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Leading Zeros
Message
De
20/09/2001 00:02:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
19/09/2001 11:41:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00558362
Message ID:
00558597
Vues:
19
>Good Day all!
>
>My question is this...I have a field in my table called OrderId it is 7 characters long. If an id is entered that is three characters (ex. 123) I would like to have it replaced with leading zeros to the max of C(7) (ex. 0000123). Is this possible to do in the table designer..input mask or format fields? Any other suggestions?

In a textbox, you can have .Format='L' and .InputMask='99999' but it will only display leading zeros; it won't transform whatever the user input is.

In a DBC, it works the same for numeric fields, but not for character. You may
replace all c7field with tran(value(c7field), "@L 9999999")
if you need to do it post festum.

(jel' zima tamo gore?)

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