VERIFIED SOLUTION i

How Users can take the Mid String Function to Parse Data


Products Affected: MapInfo Pro
How Users can take the Mid String Function to Parse Data

Users may need create an expression to select info from one column to update another.

Needing to update column “Unit” with the data to the right of the word “UNIT” in the “address” column.  This table has multiple word-length street names, and multiple-digit (both alpha, numeric, and alphanumerical) units.

Mid$(address, Instr(1,address," UNIT")+1,999)

User-added image

Select Table > Update Column  > Column to Update "UNIT" field.
Click the assist button and copy and paste the following expression in the value field: 
 Mid$(address, Instr(1,address," UNIT")+1,999)



Results will grab the word "UNIT" and everything to the right of that string.
User-added image

To retrieve only the address portion before UNIT use this update statement:

Left$(Mid$(address, Instr(1,address," unit")+1,999), Instr(1,Mid$(address, Instr(1,address," unit")+1,999)," UNIT")-1)
User-added image
UPDATED:  August 3, 2017