Previous Topic

Next Topic

Book Contents

Book Index

Replacing Text

To Replace text:

AQT will not immediately do a replace. Instead, it will generate an SQL script to do the replace. This gives you the opportunity to view the changes to your table before they are applied.

FindReplace1

Example of SQL Script

In the above example, the Replace SQL Script is as below:

FindReplace2

Replace entire value with Replace text

This option governs what the replaced value will be.

By default (this option not checked), the new value will be the value with the Find Text replaced with the Replace Text, as per normal Find/Replace. In the above example, this would be jon24@aworks.com.

If this option is checked, the new value would simply be the Replace Text. In the above example, this would be aworks.com.

Do mass update if table has no unique key

The Replace function works best when your table has a unique key. The Replace Script will generate a number of statements, each of which will update a single row.

However, you may be updating a view, or a table which does not have a unique key. In this case, select the Do mass update if table has no unique key option. The Replace Script will consist of statements such as:

Update dbo.DimCustomer Set EmailAddress = 'jon24@aworks.com' Where EmailAddress = 'jon24@adventure-works.com'

Each of these statements could potentially update more than one row. Use this option with caution.