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
- Open the table and switch to Data page. Make sure the Allow Edit button is pressed.
- Right-click the Animal column and choose Replace.
- Select desired options and click OK.
- Repeat this for another column.
Solution 2
- Open the table and switch to Data page. Make sure the Allow Edit button is pressed.
- Right-click each unnecessary column and choose Hide Column.
- Choose Search | Replace.
- Type Cat in the upper edit window and Mouse in the lower one.
- Select All in the Fields area.
- Select (if you wish) other options and click OK.
- 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.
- 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')
- Click Execute Query button or press F9. On the History page, you can check how many records where affected.
- If you are not using Autocommit, and the Commit button is active, click the button to commit changes.
See also