Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Leading Zeros
Message
From
20/09/2001 00:02:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/09/2001 11:41:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00558362
Message ID:
00558597
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform