Database Tour Documentation Contents Index

Searching and Replacing Text

Top Previous Next

Search Areas

You can search for text either in the database (e.g. in database objects' lists and datasets) or in the program interface like text in SQL windows, BLOB editor, field and index lists, report builder (Pro version), report preview (Pro version).

Depending on the selected search area, there can be different ways to activate searching/replacing functionality. Try to use items from Search menu, context menu of that area, the corresponding tool buttons, or pressing Ctrl+F / Ctrl + H (Ctrl + R).

Choose Search | Search Again or press F3 to find the text, which was searched last time, from the current cursor position.

Searching in the object list

Activate the needed object list by selecting an item from it, and then enter first symbols of the object name and press Enter. Or use the corresponding item from the Search menu.

Searching in the report builder (Pro version)

Open the report builder and use the corresponding button or menu item to find text in the text objects of the report.

Searching in the report preview (Pro version)

Open the report preview and use the corresponding button for this to find text in the text objects of the current page of the generated report.

Searching in the field or index lists

Go to the Fields or Indexes page of the selected table window, and use the corresponding button or the items from the Search menu to find a field or index in the list by its name.

Searching and replacing the text in SQL text

Activate needed SQL window. If the window contains also a opened dataset, make sure you activated the SQL text area. Then use menu items or hot keys to start your search.

Searching and replacing the text in BLOB editor

Open a dataset with text compatible BLOB field(s) and then open needed BLOB field in the BLOB editor. Make sure you have selected a correct tab. Then use menu items or hot keys to start your search.

Searching the text in SQL output

Some databases like Oracle allows to send messages from stored procedures and anonymous SQL blocks. In Database Tour, you can view such messages on Output page of SQL window. If you switch to the Output page, you can search text there too.

Searching and replacing the text in the table data

There are two search types.

1. Search for the first match in the current column. This search is faster, but stops at the first match.

To search, enter the text to find into the corresponding field right above the table and press Enter or double click the field. Some quick search options are available in the context menu of the field, where you enter text to find.

Please note that this kind of search has some limitations: for numeric columns, it can search only whole database field content, not substrings; for text columns, it can search either whole database field content or the beginning part of the field only (if the corresponding quick search option is turned on).

2. Advanced search. This search is slower, but has many options and opportunity to replace the found text. This search is available from the Search menu or context menu of the data grid.

After multiple replacing (if you click Replace All) you will get the total number of replaced text fragments.

In Database Tour Pro, the replacing can be performed also via field utilities in command line.

Notes

1. Only those database fields, which are compatible with string format, can be used in search. For autoincrement fields, only searching can be used, but not replacing.

2. Replacing works only if the data set is editable.

3. Sometimes, you might notice that not all the text is replaced after you clicked Replace All. It happens in the following situations (try to avoid such situations):

- You are trying to replace the text in the database fields, which are used in the current table index. Thus, because the searching is executiong in one direction, changing the text in current index field may change the record position in the dataset.

- In the filtered data sets, if the new text does not satisfy to filter condition. For example, the filter is tax=25 and you wish to replace all the text in the tax field with text, which differs from 25.

Search Options

Text. Enter a search string. The previously entered search strings are available from the dropdown list.

Replace with. Enter the replacement string. For replacing only. The previously entered replacement strings are available from the dropdown list.

Fields. Chose either to search/replace in all fields of the dataset or in a specified field only. For searching/replacing in datasets only.

Direction. Chose either to search in forward or backward direction.

Origin. Chose either to search in the entire area or from the current cursor position only.

Case sensitive. Turn this option on to differentiate uppercase from lowercase when performing the search.

Whole words only. Turn this option on to search words only. When this option is off, the search results might contain parts of words.

Prompt on replace. For replacing only. Turn this option on to be prompted before replacing each occurrence of the search string. When this option is off, the found strings will be automatically replaced.

See also

 Command Line Usage

 Batch Changing Field Values

 Batch Operations with Text Fields