home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
TEXT
/
PDX_ALL.ZIP
/
TI521.ASC
< prev
next >
Wrap
Text File
|
1991-09-11
|
1KB
|
67 lines
PRODUCT : PARADOX NUMBER : 521
VERSION : ALL
OS : DOS
DATE : September 11, 1991 PAGE : 1/1
TITLE : Adding the leading zeros to a zipcode field
The following script demonstrates how to add leading zeros to
zipcode fields that are formatted as numeric data types. The
script first restructures the field to "A10". The next step is
to perform a ChangeTo query on the zipcode field for all records
that only have four numbers and all records that only have three
numbers.
Menu {Modify} {Restructure} {ZIPCODE}
; ZIPCODE is the table name
MOVETO [Field Name]
LOCATE "ZIP"
; ZIP is the field name
Right CtrlBackspace TYPEIN "A10" Enter
Do_It!
Query
Zipcode | Zip |
| _4, @@@@, changeto "0"+_4 |
| _3, @@@, changeto "00"+_3 |
| |
EndQuery