Converse agora com nosso suporte
Chat com o suporte

Toad for Oracle 17.0 - Getting Started Guide

Welcome to Toad Toad Resources Required Privileges Create and Manage Database Connections Editor Basics Schema Browser Basics Data Grid Basics Work with Data Work with Database Objects Work with Code
Write Statements and Scripts Work with the Query Builder Execute Statements and Scripts Save Statements (SQL Recall) Work with PL/SQL Objects Debug Analyze Code Optimize SQL
Customize your Toad Environment Use Other Quest Software Products with Toad

Swap with Previous Line

The Edit | Swap This/Prev Lines menu item switches the line your cursor is on in the SQL script with the previous line.

For example, if the cursor is on Line 8, then when you swap, what was on line 8 would now be on line 7 and what was on line 7 would now be on line 8.

 

View File Differences

Use the Compare Files utility to compare files and scripts with other files and scripts, as well as database objects with revisions in the VCS. This utility provides a split window composed of read-only versions of the files that are different, plus an editable third window where the merged source code is assembled.

To open the Compare Files utility

Select Utilities | Compare Files, or click on the toolbar of any Toad feature that works with files.

Depending on where you open the utility, there may or may not be files displayed. If files are not displayed, you are prompted to select them. If both files are in the same directory, you can select them both at once. Otherwise, you are prompted to select both left and right sides separately.

To customize the Compare Files interface

Click to set the options.

View Differences

The upper two comparison windows make use of standard diff tool features:

  • The differences are color-coded with a legend to explain them at the bottom of the Compare Files window. By default, the Compare Files window finds the next/previous differences by block, rather than by line. You can change this option by clicking (Options) in the Compare Files toolbar, then selecting Finds next difference line.

  • The Compare Files toolbar provide tools for copy/paste, finding text, moving up and down through differences, showing only different or matching lines, and switching sides.

Compare Files also shows a Differences Map on the left side of the window. The Differences Map is a visual summary of the differences and lets you quickly change sections of the file. Colored lines show the relative position of line mismatches. An arrow represents the part of the text currently visible in the comparison window. You can click the thumbnail view to position the view at that point in the documents.

Note: If the Differences Map is not shown, click in the Compare Files toolbar.

To show line numbers and white space

On the toolbar:

  • Click to show line numbers.
  • Click to show white space.

To view a list of differences

Click on the toolbar. The report shows each difference and its line number.

Click on the toolbar to view a comparison summary. The summary shows the number of matches and the number of differences in the code on the right, as compared to the code on the left.

To view differences line by line

Click on the toolbar. This opens the line viewer pane below the split differences window.

Merge the Code

The proposed merged source code is shown in the Merged Source window at the bottom of the Compare Files window. You can revise the merged source code as needed, using tools on the toolbar, in the comparison windows, and through direct edit.

Note: If the Merged Source window is not shown, click on the toolbar.

Important! The Merged Source code is always based on the source in the left-hand comparison window.

To switch sides

Click on the toolbar to base the Merged Source on the source that is currently in the right-hand comparison window. The Merged Source code is updated to match that code because it is now in the left-hand side comparison window.

To refine the merged code

You can use any of the following methods to refine the merged code. See also the Examples at the end of this topic.

Select a line, then click the left or right arrow on the toolbar to use that line in the Merged Source. For example, to use the line from the left-hand window, click the arrow that points to the left.

Click the diamond beside any line to add that line to the merged code in the Merged Source window. When you choose a line, that change is marked as resolved and the diamond fills in with solid color.

Make any inline changes directly to the Merged Source code as needed.

To view the status of your merge work

The status bar below the Merged Source window keeps track of how many issues there are to resolve and how many are resolved.

To revert merge changes

Click on the toolbar to reload and compare the files again. Existing changes in the Merged Source window are cleared with this action.

To accept the merged code

You cannot overwrite either of the two input files. Use the Save button to save the merged code to a new file. This preserves the original two files in case they are needed.

Examples

Deleted line: A line was deleted (therefore it exists on the left side but not the right). The following options are possible:

Option 1: Click the diamond next to that line on the left (or click ) to keep that line in the Merged Source.

Option 2: Click the diamond next to that line on the right (or click ) to delete that line from the Merged Source.

 

Modified line: A modified line exists on both the left and right sides. The following options are possible:

Option 1: Click the diamond next to that line on the left (or click ) to use that line from the left in the Merged Source.

Option 2: Click the diamond next to that line on the right (or click ) to use that line from the right in the Merged Source.

 

Added line: A line was added (therefore it exists on the right side but not the left). The following options are possible:

Option 1: Click the diamond next to that line on the left (or click ) to delete the corresponding line from the Merged Source.

Option 2: Click the diamond next to that line on the right (or click ) to keep the corresponding line in the Merged Source.

 

Preview Query Results

Use the Describe (Parse) Select Query function to see what columns would be returned if the query were executed. This is useful for tuning a LONG query before it is executed.

To describe a query

Select Editor | Describe (Parse) Select Query (CTRL+F9).

 

Save Query Results

Any of Toad's window query results can be saved to the Windows Clipboard or to a file by the procedure below. Some dialog boxes do NOT have a Copy to Clipboard or Save to Disk function. This duplicates that functionality.

To save query results

  1. Turn on spooled output to disk file: Database | Spool SQL | Spool SQL To File.
  2. Run the desired Toad window (for example, the Schema Differences window) select each desired tab.
  3. From the User Files folder, open DEBUG.SQL.
  4. Copy each SQL into the Editor window.
  5. Run each SQL in the Editor window, substituting hard coded values for the bind parameter variables, or just enter them when prompted in the Variables dialog box.
  6. Save the grid contents to clipboard or disk file, using right-click, Export Dataset.

 

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação