Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image AddedImage AddedImage AddedImage AddedImage Added

The Results Compare Tool provides a user with graphical representation depicting differences between two result sets obtained from either the same query or two different queries.Image RemovedImage Added

Contents


Table of Contents
excludeContents

...

To launch the Results Compare Tool, first, execute queries, and then in the Aqua Data Studio menu bar, click Tools > Compare Tools > Results Compare. The Select Result Sets dialog displays a list of result sets of the executed queries, out of these, you can select only two for comparison. The Select PK tab in the dialog displays the common column headers present in both the selected result sets. The compare tool can filter the records in the result sets based on the applied primary keys. For more information, see Primary Key.
Image RemovedImage Added

Comparison Results Scenarios

...

You can scroll horizontally to view the comparison result. Columns present in one result set but absent from the other, Results Compare show their cell values as Null. All common column names are displayed and selected by default in the Primary Key tab. 
Image RemovedImage Added

Scenario 3: Result Sets Contain All Different Columns

When both result sets contain all different columns, the Results Compare shows only the first row from both the result set. You can scroll horizontally to view the comparison result. No column names will be displayed in the Primary Key tab.
Image RemovedImage Added

Comparison Results

The Results Compare shows the comparison result as per the listed scenarios.
Image Removed Image Added 
 
The result sets you have selected in the Select Result Sets dialog are displayed together according to their state. This table describes the color code and results for each state. 

...


You can use the navigation toggle keys () to navigate between different states and within the same state. 
On clicking a cell, view its content in the Preview Panel, also known as the Selected Cell Content area. Contents in the deleted state are displayed in the upper section. Contents in the added state are displayed in the lower section. Contents in the equal and changed states are displayed in both the upper and the lower sections. You can show or hide the Preview Panel by clicking  on the toolbar.
You can see the executed query details in the Results Compare for header. You can show/hide this header by clicking  on the toolbar. You can also see the total of fetched records and the total time taken to fetch these records right below the Grid tab. You can show/hide this information by right-clicking anywhere in the grid, and then selecting Show/Hide Toolbar
Results Compare also supports repositioning of columns and multicolumn sorting with ascending and descending. For example, to sort Country in ascending order and Sport in descending order, click the Country header and then press Ctrl, and then double-click Sport header. The icons appearing on the headers are a sign of successful sorting.
Image Removed Image Added 
Other than this, you can filter comparison result using primary keys or filtering, perform a search operation, and change the display of the grid result using . You can assign new colors to states from the Options dialog. You can refresh the comparison result or perform a new compare. You can save the comparison result in HTML and export it to Excel

...

Click , to view the comparison result as per state. When you click , the Results Compare Filter dialog is displayed.

Image RemovedImage Added

You can perform these actions in the Results Compare Filter dialog:

...

When you apply a filter, Results Compare shows the Enable filter check box as selected, which means, a filter has been applied. If you unselect this check box, then Results Compare removes the applied filter from the comparison result.  

Image RemovedImage Added

New Compare

You can choose different result sets for compare by right-clicking anywhere in the grid view and then choosing the Results Compare option. Results Compare displays the comparison result in a new tab. 
Image RemovedImage Added

Quick filters offer the advantage of filtering the records displayed in the grid view, based on the user-specific value, and finding information quickly. By using the Search box, you can define a scope to:

  • Search for text and numbers
  • Perform a case sensitive or case insensitive search
  • Search by using wildcards and regular expressions and match found options

Image RemovedImage Added

Navigating in the Grid

You can navigate between different states and within the same state by using the  and  toggle keys.  
Image RemovedImage Added

Right-Click Actions

The table describes the right-click actions in the grid view.
Image RemovedImage Added

Right-Click ActionDescription
Select All
(CTRL/Command+A)
Selects all records in the grid view. 
Results Compare
(CTRL/Command+Shift+K)
Opens the Select Results Sets dialog.
Copy
(CTRL/Command+C)
Copies the selected records in the grid view.
Copy... Shows additional options when you point to this option.
Copy As..Opens the Copy to Clipboard dialog.
Paste to WindowThis option is disabled and not applicable to Results Compare.
View As TextDisplays the selected record in the View dialog.
Show/Hide ToolbarShows/Hides the toolbar in the grid view.

...

Copy is a right-click option and shows additional options when you point to this option. The following table lists its additional options.
Image RemovedImage Added

OptionDescription

Copy With Headers 
(CTRL/Command+W)

By default, Results Compare copies data without the column headers. This option copies the headers, along with the data. See Attachment.
Copy with Row CountCopies the row count, along with the data. See Attachment.
Copy with Headers and Row CountCopies column headers and row counts, along with data. See Attachment.
Copy Headers OnlyCopies only column headers. See Attachment.
Copy All with SQLCopies the row count and column headers, along with the query from which the result set is obtained. 

...

Copy As is a right-click option and opens the Copy to Clipboard dialog. The following table lists the options in the Copy to Clipboard dialog.
Image RemovedImage Added

OptionDescription
Data OrderRetains the data presentation for horizontal data order. In Vertical data order, displays columns as rows and rows as columns. 
SeparatorAdds a separator between 2 cell values.
Quote IdentifierAdds quotes across cell value.
Leading EnclosureInserts user-specified characters at the start of copied data.
Trailing EnclosureInsert user-specified characters at the end of copied data.
One line per table rowInserts complete data in one line.
Wrap Line at ColumnWraps line at a user-specified value and then displays data in the next row.

...

Click  and view the result in the Excel file. This file is saved in the Temp folder of your system.

Image RemovedImage Added

Primary Key

Primary Keys tell Aqua Data Studio against which rows to perform a match. When you compare result sets, the common column headers in both result sets are primary keys. In the following example, after applying primary keys on the Total Medals column, Results Compare matched the unique records for Total Medals and displayed the contents of the matched records as identical or not. Also, see Comparison Results Scenarios
Image Removed Image Added 
Limitations: If a query returns multiple rows with the same primary keys, then there is no reliable way to identify modified rows in the result sets. Multiple rows of the same primary keys are obtained in 2 cases: due to user selection of the primary keys and the selection of the query columns. Initially, Results Compare is run with all of the common columns selected as primary keys. Here, if the query returns duplicate rows, it is due to query column selection. If a table has duplicate rows and no primary key defined, then there is no way to determine if those rows have been modified even though a user selects all of the table columns for the query and all of the common columns as primary keys. If this problem occurs, Results Compare is still run on the result sets using intelligent assumptions about what rows correspond to each other, but a user is warned about duplicate rows. If there are duplicate rows in the result sets on the initial run, then a user is advised to change column selection in the query. If there are duplicate rows obtained after a user changes the set of primary keys, then the user is advised to redefine the primary keys.

...