VERIFIED SOLUTION i
X

Removing and replacing a character from a String field in MapInfo Pro

UPDATED: July 26, 2018


To remove a character from a String field in MapInfo Pro, use the Search and Replace tool.

To load this tool in MapInfo Pro (64-bit), navigate to Home > Tools > Registered tab > double click on Search and Replace.
Run the tool by double clicking on Search and Replace in the Running tab.

To load this tool in MapInfo Pro (32-bit), navigate to Tools > Tool Manager. Look for Search and Replace and check Loaded.
Run the tool via Tools > Search and Replace > Search and Replace.

Once the tool has been loaded and run:
  1. In Table To Search select your table
  2. in Column To Search select the column to search
  3. In the Search String enter the character you want to replace/remove
  4. In Replacement String leave it blank if you just want to remove the character or enter a different character to replace it
  5. Click OK
Note: quotation marks are NOT used for either the search or replace dialog, a is the case for many SQL queries of character-based data.

Here is an example of replacing any instance of the letter "a" or "A" with the letter "Z" in the state_name field.

User-added image

Here's the dialog - note that quotation marks are not used:
(If the search was to be limited to replacing only the capital letter "A" or the lower case "a", then use the case sensitive check box.)
User-added image

All instances of the letter "A" or "a" have been replaced with "Z"

User-added image
 

Environment Details

Products affected: MapInfo Pro™

Downloads

  • No Downloads