KS DB Merge Tools
Documentation
for Microsoft Access
aka AccdbMerge
for SQL Server
aka MssqlMerge
for MySQL
 
for SQLite
 

Query result diff tab

  • Opened from: Query result diff toolbar action (Ctrl+Shift+Q keyboard shortcut)
  • Applicable tab-specific toolbar actions:
    • Show all, new and changed, new, changed records
    • Jump to the next, previous change
    • Select all, none, invert selection on the left, all, none, invert selection on the right side
    • Export to Excel
  • Applicable object types: Tables, Views, any database query

This tab allows to compare arbitrary query results:

Vertical toolbar between two panels contains additional tab-specific actions:

  • 'Column mapping' opens Custom data diff dialog to specify key columns, which columns to show and how to map them if you want to compare columns with changed names
  • Ignore case (for the text data)
  • Ignore leading and trailing whitespaces (for the text data, this option also makes NULL and empty string to be considered as equal)

Important note: Along with providing result, your query can do data modification - for example there can be a script with some DELETE or UPDATE statements, if you run it then it can update some data and return updated result. Be sure that your query does not perform any undesired deletions or modification. Application does not do any query text validation, it is forwarder to SQLite as is.

This tab is very similar to Data diff with three principal differences:

  • Data diff compares only one table with all record, here you can specify any query yourself
  • Query can return more than one resultset (query may contain multiple SQL statements). All these resultsets are saved in application memory after execution. There is no paging like in Data diff, where you can fetch records from DB by portions. Each time you switch show all/new/changed records - Data diff fetchs new result from server, but Query result diff uses resultsets from memory
  • Query results from this tab can not be merged, only compared

Top panel contains:

  • Run action, which also available by F5 keyboard shortcut
  • Three keys&columns mapping options. 'Basic key column mapping' option shows Query key columns dialog to define key columns only. 'Customize key & data column mapping' shows Custom data diff dialog to setup both keys and rest of columns mapping
  • 'Split query' option will split query text in two parts, so that you can compare two different query results
  • 'Run both against the same project' option make sense only in 'Split query' mode. It allows you to compare two different query results for the same database

All these options are available with Alt and action key from keyboard. Action key is underlined when you hit the Alt key. So, for example Alt+S shortcut switches 'Split query' option

Results top panel contains:

  • Resultsets control (on the right side), which becomes active when your query returns more than one resultset
  • –°hanges summary for each side: total, new, changed and new+changed row count for the whole table and for current page, selected row count
  • Query execution time measured on application side

Main results data grid has row selection checkbox nearby - so you can select number of rows with mouse or with Space button from keyboard and do export of selected rows only. This data grid also allows column sorting with click on the column name.

Results bottom panel shows selected line from both sides, providing easier comparison of changed values.

Free version limitations:

  • The whole tab is not available

Last updated: 2021-08-10