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 >
Text File  |  1991-09-11  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  521
  9.   VERSION  :  ALL
  10.        OS  :  DOS
  11.      DATE  :  September 11, 1991                       PAGE  :  1/1
  12.  
  13.     TITLE  :  Adding the leading zeros to a zipcode field
  14.  
  15.  
  16.  
  17.  
  18.   The following script demonstrates how to add leading zeros to
  19.   zipcode fields that are formatted as numeric data types.  The
  20.   script first restructures the field to "A10".  The next step is
  21.   to perform a ChangeTo query on the zipcode field for all records
  22.   that only have four numbers and all records that only have three
  23.   numbers.
  24.  
  25.  
  26.   Menu {Modify} {Restructure} {ZIPCODE}
  27.           ; ZIPCODE is the table name
  28.   MOVETO [Field Name]
  29.   LOCATE "ZIP"
  30.           ; ZIP is the field name
  31.   Right CtrlBackspace TYPEIN "A10" Enter
  32.   Do_It!
  33.  
  34.   Query
  35.  
  36.    Zipcode |            Zip                |
  37.            | _4, @@@@, changeto "0"+_4     |
  38.            | _3, @@@, changeto "00"+_3     |
  39.            |                               |
  40.  
  41.   EndQuery
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.