This topic is mostly for newbies. It shows examples of how to search and replace data in Database Tour software.

Let's assume the corresponding database is already opened.

Task 1

Task: Find the 'Bill' word in field 'Name'.

Open the table and switch to Data page. Right-click the 'Name' column and choose Find. Select desired options and click OK. If the software found the text, it activates the corresponding cell. To continue the search in other cells, press F3.

Task 2

Task: Replace all the 'Cat' words in the fields 'Animal' and 'Description' with the 'Mouse' word.

Solution 1

  1. Open the table and switch to Data page. Make sure the Allow Edit button is pressed.
  2. Right-click the Animal column and choose Replace.
  3. Select desired options and click OK.
  4. Repeat this for another column.

Solution 2

  1. Open the table and switch to Data page. Make sure the Allow Edit button is pressed.
  2. Right-click each unnecessary column and choose Hide Column.
  3. Choose Search | Replace.
  4. Type Cat in the upper edit window and Mouse in the lower one.
  5. Select All in the Fields area.
  6. Select (if you wish) other options and click OK.
  7. If you are not using Autocommit, and the Commit button is active, click the button to commit changes.

Solution 3

This is task is easily solvable by SQL means, if your database allows this. The next example is for PostgreSQL database.

  1. Create new SQL window and type the following SQL text in the SQL editor:
    UPDATE animals
    SET 
      animal = replace(animal, 'Cat', 'Mouse'),
      description = replace(description, 'Cat', 'Mouse')
  2. Click Execute Query button or press F9. On the History page, you can check how many records where affected.
  3. If you are not using Autocommit, and the Commit button is active, click the button to commit changes.

See also

 Searching and Replacing Text

 Working with SQL Queries