Altova DiffDog 2024 Enterprise Edition

Merging Differences

Home Prev Top Next

After running a file, directory, Microsoft Word document, database data, or database schema comparison in a comparison window, you can merge differences that exist between the directories/files/Microsoft Word documents/tables in the two panes or components, respectively.

 

In File Comparison windows and Word Comparison windows,a difference (that is, a text fragment for which there is no, or no identical, corresponding text fragment in the compared file) can be copied over from one file to the corresponding location in the other file. Note that in Microsoft Word document comparisons both text and formatting will be copied from the source to the target file.

 

In Directory Comparison windows, the selected non-equal file (a file for which no, or no equal, corresponding file exists in the compared directory) can be copied from one directory to the other directory.

 

In Database Data Comparison windows, data of (i) the selected table(s) or (ii) all tables can be copied from one component to the other component. In Database Data Comparison Result windows, non-equal data of the selected rows can be copied from one table to the other table. In both windows, a warning message providing details of the changes is displayed and has to be confirmed before the changes are committed to the database. The necessary database structure change scripts are generated and executed in the background.

 

In Database Schema Comparison windows, the structure of (i) the selected item(s) or (ii) all items can be copied from one component to the other component. Please note that the merge is not executed immediately; DiffDog  always shows the database structure change script first and provides the options to save it to a file or display it in DatabaseSpy (if installed).

 

You use the following commands to merge a difference:

 

ic_copy-L2R Copy from Left to Right (Alt+Right)

 

For the selected difference in a file comparison or Microsoft Word comparison, copies text from the document in the left pane to the document in the right pane.

For the selected non-equal file in a directory comparison, copies the file from the (directory in the) left pane to the (directory in the) right pane.

For the selected table in a database data comparison, copies the table's data from the (table in the) left component to the (table in the) right component.

For the selected non-equal row in a database data comparison result, copies the data from the row in the left column to the row in the right column.

For the selected non-equal item in a database schema comparison, opens the Merge Schema Left to Right dialog box, where the resulting change script is displayed. In this dialog box you can choose to execute the SQL, save it to a file, or show it in DatabaseSpy (if installed).

 

ic_copy_R2L Copy from Right to Left (Alt+Left)

 

For the selected difference in a file comparison or Microsoft Word comparison, copies text from the document in the right pane to the document in the left pane.

For the selected non-equal file in a directory comparison, copies the file from the (directory in the) right pane to the (directory in the) left pane.

For the selected table in a database data comparison, copies the table's data from the (table in the) right component to the (table in the) left component.

For the selected non-equal row in a database data comparison result, copies the data from the row in the right column to the row in the left column.

For the selected non-equal item in a database schema comparison, opens the Merge Schema Right to Left dialog box, where the resulting change script is displayed. In this dialog box you can choose to execute the SQL, save it to a file, or show it in DatabaseSpy (if installed).

 

In file and Microsoft Word comparisons, the source difference is copied in its entirety (i.e., the entire unit highlighted in the current difference background color overwrites the entire difference in the target document). Merged differences in file and Microsoft Word document comparisons can be shown in a different background color. This setting is made in the File Comparison tab of the DiffDog Options dialog box.

To merge a difference in file, Microsoft Word, and directory comparisons:

1.Place the cursor in the required difference (which could be anywhere in the document) or navigate to it using the Next Difference ic_next-diff or Previous Difference ic_previous-diff navigation commands listed above.

2.If applicable, select the menu option Diff and Merge | Make Current Difference or press Alt+Enter or select the corresponding toolbar icon ic_make-current-diff from the Diff and Merge toolbar.

 

3.Do one of the following:

 

Select the menu option Diff and Merge | Copy from Left to Right or click the corresponding toolbar icon ic_copy-L2R or press Alt+Right if you want to copy from the left pane to the right pane.

 

Select the menu option Diff and Merge | Copy from Right to Left or click the corresponding toolbar icon ic_copy_R2L or press Alt+Left to copy from the right pane to the left pane.

To merge database data:

To merge every difference in all tables of a database comparison, select the menu option Diff and Merge | Copy from Left to Right (Alt+Right) or Copy from Right to Left (Alt+Left), respectively.

To merge every difference in selected tables of a database comparison, select one or several tables in the left or right component and choose the menu option Diff and Merge | Copy from Left to Right (Alt+Right) or Copy from Right to Left (Alt+Left), respectively. Alternatively, right-click the desired tables and choose Merge selected Left to Right or Merge selected Right to Left, respectively, from the context menu.

 

An information box with an overview appears. Optionally, click the Show Details button, and click Yes to confirm the merge.

 

To merge selected differences in a result window of a database comparison:

 

1.Select a table in the left or right component and choose the menu option Diff and Merge | Show results or right-click a table and choose Show selected results from the context menu. Alternatively, click the comparison result ic_diffs icon.

2.In the Database Data Comparison Result window, place the cursor in the required difference (which could be anywhere in the document) or navigate to it using the Next Difference ic_next-diff or Previous Difference ic_previous-diff navigation commands listed above.

3.Select the menu option Diff and Merge | Copy from Left to Right (Alt+Right) or Copy from Right to Left (Alt+Left), respectively).

4.In the Merge data (x to y) dialog box that appears, choose either the Merge the selected rows and cells or the Merge the whole table radio button.

5.Click Yes to confirm the merge.

To merge database schemas:

1.Place the cursor in the required difference and do the following:

Select the menu option Diff and Merge | Copy from Left to Right or click the corresponding toolbar icon ic_copy-L2R or press Alt+Right if you want to copy from the left pane to the right pane.

Select the menu option Diff and Merge | Copy from Right to Left or click the corresponding toolbar icon ic_copy_R2L or press Alt+Left to copy from the right pane to the left pane.

 

The Merge Schema Left|Right to Right|Left dialog box appears and shows the SQL that will change the schema in the database.

 

2.Chose one of the following options:

 

Click Execute to commit the changes to the database.

Click Save SQL to File to save the script to a file for later execution.

If you have DatabaseSpy installed, click Show SQL in DatabaseSpy to display the SQL in DatabaseSpy's SQL Editor where you can check, edit, and execute the script.

© 2017-2023 Altova GmbH