Separating city, state
values when contained in the same column?
Question:
How can the city value be updated into a new
column when a column currently contain both city and state in the same column
(i.e. Atlantic City, NJ)?
Answer:
Note: The information below assumes that the
column is populated the same for all records in this column. For example:
New York, NY
Albany, NY
Create a new column called city through
Table>Maintenance>Table Structure. When the city and state abbreviations
are in the same column, separated by a comma, the city can be extracted through
Table>Update Column. Update the newly added city column with:
Left$(Col_name,Len(Col_name)-4)
This looks at the right most four places, the
two letter state abbreviation, the space and the comma, and takes everything to
the left of these four spaces which would represent the city name.
Reference:
MapInfo Products Knowledge Base