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
    • Text diff options: igmore case, ignore leading and trailing whitespaces
  • Applicable object types: Tables, Views, Stored procedures, any database query

This tab allows to compare arbitrary query results:

Important note: Along with providing result, your query can do data modification - for example if you execute stored procedure then it can update some data and return update 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 MySQL 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 (it can be stored procudure call that returns many resultsets, or just 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 fields 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
  • Column mapping link in the middle that 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
  • –°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: 2019-07-25