How-to: Browse data with lookup texts instead of raw number codes

SQLMerger already has a lot of information about the database, when a project has been generated. Often database designers and other use some naming conventions and those SQLMerger can often interpret, and find out what actually is referenced textually. If for example there exists a field like "UserId" in a table and in the same project, a table "User", with a field called "Id", "UserId" or similar, there is a good chance that for example a "DisplayText" or "username" field from the User table will be a good candidate for a lookup text, that for example can be displayed instead of the number "4". That is very conveinient!, especially if the value can then be edited via a drop down,... and that is exactly what it can!

Do:

1. First, open your tables:

You can open both tables by using the option "Open Source & Target" from the "Item" menu, or you can just click the [Open Source] and [Open Target] buttons. (Notice, if you invoke an operation in SQLMerger that needs data, SQLMerger will open the data automatically, for your convenience.)

The database etc. shown below in the example is from the built-in demo.

When data has been opened the main window will look like:

SQLMerger - Visualize Differences

The contents of a table referring other tables may be difficult to handle when only human. There's only numbers here, help me!

 

2. Automatically add lookup specifications.

Choose the option "Auto create lookup definitions for merge item" from the "Item" menu.

SQLMerger - Visualize Differences

This opens a window where you can see what SQLMerger proposes for lookup texts:

SQLMerger - Visualize Differences
Automatically detected lookup texts. You can adjust as desired.

Click the [OK] button.

 

3. When you open the data again, you will now see this:

SQLMerger - Visualize Differences
Easy modification of data that really is only the key values. This also prevents input errors.

This is much better for a human being to look at.

Finished!

 

Tip:

SQLMerger can go through several lookup tables to look up the texts. You just need to create multiple lookup definitions manually and used them linked together.

Tip:

There are facilities to add and correct lookup definitions manually. See the options "Add Lookup", "Edit Lookup" in the "Item" menu.Or click the expand icon on the merge item in the project and then the [...] button.

Tip:

You can also manually specify a custom SQL query, in a lookup definition, to find exactly what you want to see. The lookups are also there the next time you open the project, so you always have better access to see and edit data.