Sidebar

Mobile navigation sidebar

Sidebar

Mobile navigation sidebar

Back to Documentation
Features

Snippet and report menu actions

Run reusable SQL from database-object context menus and show the result without opening a worksheet.

Snippet and report menu actions

Turn any entry in the Snippets / Reports view into a reusable action for the Connections tree. The action substitutes details from the item you right-clicked, runs on the destination connection you configured, and opens the SQL result directly in the results panel.

Configure an action

  1. Right-click a snippet or report and select Edit menu action.
  2. Enable Enable as a menu action and enter the title users will see.
  3. Select all object types or the specific types where the action applies. You can also enable it for connection folders.
  4. Choose the source connections where the action should appear. Selecting All connections makes it available everywhere that matches the selected object types.
  5. Choose the destination connection where the SQL will run, then save.

Right-click a matching object or folder and select Snippet / report actions…. If several actions match, select the one to run.

Substitution strings

Use these strings anywhere in the SQL:

String Replaced with
[object_name] Name of the selected database object
[object_type] Oracle object type, such as TABLE or VIEW
[schema_name] Owner/schema shown by the selected object
[owner] Alias for [schema_name]
[connection_name] Name of the source connection where you opened the menu
[folder_name] Name of the selected connection folder

For example:

select *
from [schema_name].[object_name]

Substitutions are inserted as plain SQL text. Add quoting in your snippet when your database naming rules require it. A token that is not recognised is left unchanged; a recognised token without a value is replaced with an empty string.

Source and destination connections

The source-connection selection only controls where the action is offered. The destination connection controls where the substituted SQL is executed. They may be different, which is useful for central reporting schemas or administration databases.

The action opens a new results tab and does not create or reveal a worksheet.