Page 1 of 1

Add BMC field and data to your database

Posted: Wed Jul 22, 2009 10:03 am
by Eric
If you want to add a BMC field to your database and populate it with the 3 digit BMC ZIP based on your 5 digit ZIP Code, then open your database, pull down the Edit menu to Command, and run this command:

Code: Select all

* Suppress Messages 
ON ERROR com_Mesg=MESSAGE() 

* Add BMC column
ALTER TABLE (ALIAS()) ADD COLUMN bmc C(3) 

* Add BMC number 
REPLACE ALL bmc WITH substr(GetLineValue(ADDBS(xDefFldr)+"iPresort\DMM\AZL601.txt",INT(VAL(LEFT(zip,3))),67,.T.,.T.),9,3)