サポートと今すぐチャット
サポートとのチャット

SQL Navigator for Oracle 7.4 - Installation Notes

Edit, Compile And Execute

The Code Editor opens ready to edit SQL code. You will see the SQL Toolbar (Code Editor SQL) and a blank canvas to write SQL code. If you create / open objects requiring PL/SQL code you will see the PL/SQL Toolbar (Code Editor PL/SQL).

Features Description

Standard Editing Functions

All standard editing functions are available.

See:

Control the contents of the Code Editor window Toolbars for Code Editor SQL or Code Editor PL/SQL as appropriate.
Manage objects in schemas Main Menu | Object Menu
Handle text-and code Main Menu | Edit Menu
Search for code or objects Main Menu | Search Menu
Access to various SQL Navigator windows and tools Main Menu | View Menu
Manage database sessions Main Menu | Session Menu
Access add-ons, integrated applications and additional tools Main Menu | Tools Menu

See also:

Some functions are duplicated on the shortcut menu. Right click in the editing pane to open the shortcut menu.

Working with objects

Drag and drop objects from the following SQL Navigator modules into the editing pane.

Show the definition of the object at the cursor location:

  1. Right click on the object in the editing pane and select Go to Definition.
  2. The result is shown in the Output Window.

Describe the object at the current cursor location:

  1. Press CTRL and click the object's name.
  2. This opens Describe for the object.

TIP:

  • To construct SQL statements, drag and drop column names from the Describe tool into the editing pane.
  • If the described object is a text object (view, procedure, function, package or packaged procedure/function) and the Source Preview window is open, the object’s source is automatically previewed.

Automated Coding Assistance

Auto Code Completion

As you type an identifier the editor displays a selectable list of matching symbols (variables, parameters, procedures, types) in the current scope.

TIP: Turn on/off code completion from the Code Editor Toolbar.

Dot-lookup Type a dot character after a name of variable. The editor automatically displays a selectable list of members of a PL/SQL record, cursor, package or %ROWTYPE record.
Code Explorer The Code Explorer displays a hierarchical list of all symbols in the package or procedure, and highlights the procedure the cursor is currently in. Double-click on a symbol to navigate within the program. It dynamically parses and checks syntax.
Hyperlinks To see the declaration of an identifier, press Ctrl+click. The text cursor automatically jumps to the declaration of the symbol if it's defined within the same program. If it's a name of an external database object, an Auto Describe opens.
Syntax tool tips Point to a variable, parameter or procedure with the cursor to see a description of it.

Insert ready made code

Insert ready made code into the editor.

  1. Place the cursor in the editor window where you want the code to be inserted
  2. Press Ctrl+J. The template names display in a drop-down list.
  3. Select the name of the template you want to insert from the drop-down list.
  4. Press Enter.

To manage, create and edit the ready made code, see Code Templates.

Drag and drop PL/SQL syntax, SQL functions, column names, and database object names into code using the Code Assistant.

Code with multiple SQL statements

and

PL/SQL blocks

Code Description

SQL

If you write multiple SQL statements in the editing pane then ensure each SQL statement ends with either:

  • a semicolon (;)
  • " / " on the next line.

TIP: There is a quick way to construct SELECT statements for multiple tables. Highlight the tables in DB Explorer, drag and drop them into the editing pane. This behavior is set in View | Preferences | Code Editor | General | Drag & Drop.

PL/SQL

PL/SQL blocks entered into the script must have either

  • a forward slash /
  • or a period mark .

following the last line of the block.

This is necessary because the PL/SQL blocks can themselves contain blank lines and semicolons.

When you create or execute a PL/SQL anonymous block, the semicolons are required in the SQL statement. For example

BEGIN

Test_procedure;

END;

Execute the SQL query

or

Compile the PL/SQL code

Execute the SQL query

See: The toolbar: Code Editor SQL.

 

Compile the PL/SQL code

See: Code Editor PL/SQL, PL/SQL Debugger, DBMS_OUTPUT.

You can compile a program that is stored in the database. While the program is being edited, use the Save command to compile and store it. Once the program has been modified, you will need to save the program prior to any further usage of the Compile/Rebuild functionality - This is to ensure that the changes in the program have been applied to the database.

SQL Navigator displays all syntax and compiler errors in a separate scrollable pane. Click on the error text to show the source code at the source of the error. Double click on the error text to show the error message description, cause and actions as per the Oracle documentation.

Also watch for feedback in the Output Window.

 

Auto Reparse

Many features of the Code Editor, including the Code Explorer window, code completion, tool tip display of program arguments, bracket matching, collapse loops/blocks, and others, rely on automatic parsing of the PL/SQL code and internally generating a symbol table. This parsing occurs when the editor first loads the objects, and it also occurs in the background in order to maintain the symbol table as the user edits the code.

You can also manually trigger a full reparsing (updating of the internal symbol table) at any time by right-click and select Auto Reparse from the shortcut menu. However, when loading a really large script having this option on will slow down SQL Navigator. Hence, to avoid wasting CPU resources, you should turn this option off when editing large scripts.

 

Symbols in the gutter margin

Symbols in the gutter margin provide a visual indication of the statement’s status.

Icon Description
Enabled breakpoint. For more on debug see PL/SQL Debugger.
Disabled breakpoint. For more on debug see PL/SQL Debugger.
Current execution line
Invalid breakpoint. For more on debug see PL/SQL Debugger.

This statement executed with errors.

Information about the error is displayed. Double click on this information to open the Oracle Error Information dialog.

This SELECT statement produced results.

TIP:

  • Double click on the icon to jump to the associated results tab (Press CTRL+F11).
  • There can be multiple results displays, one per statement executed. Each result set is displayed in a separate tab.
  • See SQL Query Results Data Grid
  • When a result tab is selected, the corresponding statement will be focused.
This non-select statement executed successfully.
This statement was executed with warnings.

Look and Feel

Feature Description

Collapse / Expand Statements

You can collapse/expand a block, procedure, loop or IF statement by clicking on the - or + symbols to hide/show codes.

TIP: When the script is exceptionally long the collapse/expand codes may slow down the application. You can choose to disable this feature in View | Preferences |Code Editor | General| Enable Code Collapsing.

Syntax highlighting

The Code Editor uses colors to highlight PL/SQL and SQL keywords, text and comments.

When you set the cursor at a bracket within an expression, the matching bracket is automatically highlighted.

Bookmarks

Lines of code can be bookmarked so you can return to them easily.

  • To add / list / go to bookmarks see the Edit Menu.
  • (0-9) in the gutter margin indicate Bookedmarked lines.

Variable declarations

To move the cursor to the declaration of a variable (or Auto Describe it if it’s the name of an external database)

Press CTRL and point to the variable with the mouse.

To return to the former position in the text, press ALT+Left Arrow.

Switch between specification and body

Press CTRL+SHIFT plus the down or up arrow to move the cursor between the specification and the body.

Formatter Tools

SQL Navigator's Formatter Tools is a unique utility for reformatting existing PL/SQL, SQL*Forms, Oracle Forms, and SQL*Plus source code. See the Code Editor toolbar: Code Editor SQL or Code Editor PL/SQL.

Automatic Indentation

When you insert multi-line text into the editor, the text is placed at the same indentation level as the current cursor position. For best results, before inserting text, place the cursor at the location and indentation level where you want the inserted text to appear.

Manipulate rectangular blocks of code

Right click on the code and select Edit | Selection Mode | Block or press ALT+F7.

The block selection is limited to the length of the last line. To overcome this limitation select View | Preferences | Code Editor | General | Allow Caret after EOL.

Show/hide invisible characters

Right click on the code and select Edit | Show Tabs/Eol/Eof

Switch between tabs and spaces

Right click on the code and select Edit | Tabs/Spaces and select from the available options.

Requires View | Preferences | Code Editor | General | Use Tab Characters selected.

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択