How-to: Re-style texts contents to uniform style on e.g. user interface labels

Ensuring consistency in text strings field throughout all records in a table is done in secords with SQLMerger.

If you are in a situation where you need all texts to be in the same textual style this can be easily accomplished with SQLMerger. A change script is automatically generated, so it is easy to apply the changes on other databases.

Do:

In the example we will use the PaymentStatus table from the built-in demo database.

1. Open the table “PaymentStatus”

This can be done by clicking the [Open Target] button.

 
Initial contents of the table. We will style the "DisplayText" field.

 

2. Select a text field. Then choose the "Apply a Text Style (for current column)" option from the "Actions" menu.

 
Invoking the operation.

 

This will bring up the "Apply a Text Style" window.

 
If you select the drop down arrow, you wil see a list of all possible text styles.

 

3. Select one of the styles and click the [OK] button.

 
Style with lowercase letter words separated by "-" selected.

 

SQLMerger will now go through the records and change the texts.

 
Notice there is now checks in the Upd. (Update) column. Only cells where the contents are actually different from the original are updated.

 

4. Select the "Script" tab, to have SQL generated.

 
Script for updating the records.

5. Click the [Execute] button.

A screen shot of the Execute Script button from the SQLMerger software

6. Click the Merge tab and see the new updated contents.

 

Finished.

 

Tip:

You can combine the re-style functionality with the search and replace functionality to brush up texts and ensure consistency easily.

Tip:

If there are some records you don't want to update, you can filter them out in the "where" clause of the SQL select statement for the target.

Tip:

You can also uncheck some of the checkmaks in the "Upd." column and then no SQL will be generated for updating the record eventually.